From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: dired-move-to-filename-regexp Date: Sun, 19 Sep 2004 01:20:54 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <7w8yb6wty1.fsf@sic.twinsun.com> References: <414D38E0.4080300@math.ku.dk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095582124 26660 80.91.229.6 (19 Sep 2004 08:22:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Sep 2004 08:22:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 19 10:21:48 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C8wx9-0001m4-00 for ; Sun, 19 Sep 2004 10:21:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8x2y-0007iT-Dr for ged-emacs-devel@m.gmane.org; Sun, 19 Sep 2004 04:27:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C8x2o-0007iN-Cs for emacs-devel@gnu.org; Sun, 19 Sep 2004 04:27:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C8x2m-0007iB-VD for emacs-devel@gnu.org; Sun, 19 Sep 2004 04:27:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C8x2m-0007i8-S6 for emacs-devel@gnu.org; Sun, 19 Sep 2004 04:27:36 -0400 Original-Received: from [198.147.65.9] (helo=alcor.twinsun.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C8wwY-0007pz-8q for emacs-devel@gnu.org; Sun, 19 Sep 2004 04:21:10 -0400 Original-Received: from sic.twinsun.com ([192.54.239.17]) by alcor.twinsun.com (8.12.9/8.12.9) with ESMTP id i8J8Kt7w005554; Sun, 19 Sep 2004 01:20:55 -0700 (PDT) Original-Received: from pete.twinsun.com (pete.twinsun.com [192.54.239.43]) by sic.twinsun.com (8.11.7p1+Sun/8.11.7) with SMTP id i8J8Kt602152; Sun, 19 Sep 2004 01:20:55 -0700 (PDT) Original-Received: from sic.twinsun.com ([192.54.239.17]) by pete.twinsun.com (SMSSMTP 4.0.0.59) with SMTP id M2004091901205500142 ; Sun, 19 Sep 2004 01:20:55 -0700 Original-Received: (from eggert@localhost) by sic.twinsun.com (8.11.7p1+Sun/8.11.7) id i8J8Ktb02148; Sun, 19 Sep 2004 01:20:55 -0700 (PDT) Original-To: Lars Hansen In-Reply-To: <414D38E0.4080300@math.ku.dk> (Lars Hansen's message of "Sun, 19 Sep 2004 09:44:32 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (usg-unix-v) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27270 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27270 Lars Hansen writes: > Can you explain the reason for this change? (lisp/ChangeLog.8): > > 1999-02-16 Paul Eggert > * dired.el (dired-move-to-filename-regexp): Prepend .* so that we > find the last match if there are multiple matches. It was because some combinations of link-count, user and group name and/or number, and sizes looked like dates, and this broke Emacs dired. > It has the consequence that file names starting with a date, as in the > attached example, are not correctly identified. Yes. There's no way in general to solve the problem if you stick with ordinary "ls" output, as it is textually ambiguous if you are trying to parse all the "ls" versions out there. The best we can do is to use heuristics. (Currently one of the heuristics is, "Please don't use file names that start with strings that look like dates and are followed by spaces." :-) I thought RMS had recently implemented support for GNU "ls -lD" in CVS Emacs. That should solve the problem in general when GNU "ls" is being used, since "ls -lD" exactly identifies where each file name is. The problems you're running into would then occur only with non-GNU "ls", for which the obvious solution is to install GNU "ls".