[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired can't open dir name contains `[' and `]'
From: |
Eli Zaretskii |
Subject: |
Re: dired can't open dir name contains `[' and `]' |
Date: |
Tue, 19 Jun 2007 08:57:15 +0300 |
> From: Zhang Wei <address@hidden>
> Date: Tue, 19 Jun 2007 04:11:06 +0800
>
> If a directory's name contains `[' and `]' such as `[music]', dired
> can't open it. It display a "No match" message under the dir name other
> than the contents of the dir:
>
> --8<---------------cut here---------------start------------->8---
> d:/download/[music]:
> (No match)
> total used in directory 0 available 676744
> --8<---------------cut here---------------end--------------->8---
Thanks.
This happens because ls-lisp, the Lisp emulation of `ls' used in the
Windows port, interprets shell wildcards in file names, so "[music]"
is interpreted as one of the characters m, u, s, i, c.
Unfortunately, it looks like the function wildcard-to-regexp used by
ls-lisp to convert a wildcard to a regular expression does not have
any way to quote special characters such as [].
So fixing this will take some work. I hope to find time this weekend
for that, if no one else beats me to it.
> Recent messages:
> ls-lisp-insert-directory: Invalid regexp: "Unmatched [ or [^"
I don't get this message, though. Can you tell how you managed to
trigger it?
- dired can't open dir name contains `[' and `]', Zhang Wei, 2007/06/18
- Re: dired can't open dir name contains `[' and `]',
Eli Zaretskii <=
- Re: dired can't open dir name contains `[' and `]', Zhang Wei, 2007/06/19
- Re: dired can't open dir name contains `[' and `]', Eli Zaretskii, 2007/06/19
- Re: dired can't open dir name contains `[' and `]', Eli Zaretskii, 2007/06/23
- Re: dired can't open dir name contains `[' and `]', Eli Zaretskii, 2007/06/23
- Re: dired can't open dir name contains `[' and `]', Eli Zaretskii, 2007/06/23
- Re: dired can't open dir name contains `[' and `]', Zhang Wei, 2007/06/23
Re: dired can't open dir name contains `[' and `]', Eli Zaretskii, 2007/06/23