emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in ange-ftp parsing of ls output


From: Michael Albinus
Subject: Re: Bug in ange-ftp parsing of ls output
Date: Thu, 20 Oct 2005 22:11:01 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

address@hidden (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]\\|[^-]\\)\\([A-Za-z]\\|[^-]\\)+[.]?,? * [ 
> 0-3][0-9][.]?\\|[ 0-3][0-9][.]? 
> \\([A-Za-z]\\|[^-]\\)\\([A-Za-z]\\|[^-]\\)+[.]?,? *\\)\\|[ 
> 0-1][0-9][^-] [ 0-3][0-9][.]?[^-]\\) "

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]