From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Bug in ange-ftp parsing of ls output Date: Thu, 20 Oct 2005 22:11:01 +0200 Message-ID: <87sluwosoa.fsf@gmx.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1129839159 15212 80.91.229.2 (20 Oct 2005 20:12:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2005 20:12:39 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 20 22:12:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESgkn-0007wY-Sh for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2005 22:11:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESgkn-0006oZ-A4 for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2005 16:11:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESgkd-0006oJ-G3 for emacs-devel@gnu.org; Thu, 20 Oct 2005 16:10:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESgkc-0006np-Vk for emacs-devel@gnu.org; Thu, 20 Oct 2005 16:10:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESgkc-0006nm-So for emacs-devel@gnu.org; Thu, 20 Oct 2005 16:10:58 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1ESgkc-0001Nt-KN for emacs-devel@gnu.org; Thu, 20 Oct 2005 16:10:58 -0400 Original-Received: (qmail invoked by alias); 20 Oct 2005 20:10:56 -0000 Original-Received: from p54BDB06D.dip0.t-ipconnect.de (EHLO localhost.local) [84.189.176.109] by mail.gmx.net (mp016) with SMTP; 20 Oct 2005 22:10:56 +0200 X-Authenticated: #3708877 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Wed, 19 Oct 2005 16:08:24 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44443 Archived-At: storm@cua.dk (Kim F. Storm) writes: > I've digged out the following line from the response to an > ls -al command: > > -rw------- 1 kfs 0 May 27 2003 .autorun.lck > > Now, if I position the cursor at the beginning of that line > and enter > > M-: (ange-ftp-parse-filename) RET > > it returns: > > "27 2003 .autorun.lck" > > If I do > M-: (re-search-forward ange-ftp-date-regexp nil t) RET > at that position, point moves to the "M" in May. > > This is obviously wrong, but the ange-ftp-date-regexp is beyond me: > > "[0-9] \\(\\(\\([A-Za-z]\\|[^=00-]\\)\\([A-Za-z]\\|[^=00-]\\)+[.]?,? * = [ 0-3][0-9][.]?\\|[ 0-3][0-9][.]? \\([A-Za-z]\\|[^=00-]\\)\\([A-Za-z]\\|[^= =00-]\\)+[.]?,? *\\)\\|[ 0-1][0-9][^=00-] [ 0-3][0-9][.]?[^=00-]\\) " This way the regexp is beyond me, too. Fortunately, it is well documented in the ange-ftp.el sources. The problem is that the line you've digged does not contain a group id. That's why, "kfs 0" is regarded as a date. > If I change the line to > > -rw------- 1 kfs 10 May 27 2003 .autorun.lck Same problem. "kfs 10" is regarded as a date. > it still fails, but this line works: > > -rw------- 1 kfs 100 May 27 2003 .autorun.lck "kfs 100" is not a date because "100" exceeds the range of days :-) > What's going on? I've submitted a fix which should solve your problem. I cannot check whether it breaks the syntax for Japanese dates - could somebody, please, check it? Best regards, Michael.