[Top][All Lists]
[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.
- Bug in ange-ftp parsing of ls output, Kim F. Storm, 2005/10/19
- Re: Bug in ange-ftp parsing of ls output,
Michael Albinus <=
- Re: Bug in ange-ftp parsing of ls output, Stefan Monnier, 2005/10/20
- Re: Bug in ange-ftp parsing of ls output, Michael Albinus, 2005/10/21
- Re: Bug in ange-ftp parsing of ls output, Stefan Monnier, 2005/10/21
- Re: Bug in ange-ftp parsing of ls output, Richard M. Stallman, 2005/10/21
- Re: Bug in ange-ftp parsing of ls output, Michael Albinus, 2005/10/23
- Re: Bug in ange-ftp parsing of ls output, Richard M. Stallman, 2005/10/23
- Re: Bug in ange-ftp parsing of ls output, Michael Albinus, 2005/10/25