[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ in directory name breaks dired
From: |
Chris Moore |
Subject: |
[ in directory name breaks dired |
Date: |
Wed, 22 Oct 2003 01:14:10 +0200 |
If a directory name contains a '[' then dired can't list it.
If the '[' is matched in the name by a following ']' then there's no
error, but the dired listing is empty (it doesn't even show '.' and
'..').
If, on the other hand, the '[' is unmatched, I get a Lisp error.
Notice that the 3rd argument to 'insert-directory' (wildcard) is nil,
and yet the argument still gets treated as if it were a wildcard.
I'm guessing that may be the source of the problem:
Debugger entered--Lisp error: (invalid-regexp "Unmatched [ or [^")
directory-files-and-attributes("c:/chris/" nil "\\`[x\\'" t)
ls-lisp-insert-directory("c:/chris/" (97 108) nil "\\`[x\\'" t)
insert-directory("c:/chris/[x/" "-al" nil t)
(if file-list (dolist (f file-list) (insert-directory f switches
nil nil)) (insert-directory dir switches wildcard (not
wildcard)))
(let ((opoint ...) (process-environment ...) end) (if (or
dired-use-ls-dired ...) (setq switches ...)) (if file-list (dolist
... ...) (insert-directory dir switches wildcard ...)) (if (not
...) (save-excursion ... ... ... ... ... ...))
(dired-insert-set-properties opoint (point)) (unless
(save-excursion ... ...) (let ... ...)) (save-excursion (goto-char
opoint) (if ... ...) (when wildcard ...)))
* dired-insert-directory("c:/chris/[x/" "-al" nil nil t)
(if (and (equal "" ...) (not file-list)) (dired-insert-directory
dir dired-actual-switches nil nil t) (if (not ...) (error
"Directory %s inaccessible or nonexistent" dir)
(dired-insert-directory dir dired-actual-switches file-list ...
t)))
(let (dir file-list) (if (consp dired-directory) (setq dir ...
file-list ...) (setq dir dired-directory file-list nil)) (setq dir
(expand-file-name dir)) (if (and ... ...) (dired-insert-directory
dir dired-actual-switches nil nil t) (if ... ... ...)))
dired-readin-insert()
Chris.
In GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600)
of 2003-10-08 on CHRISLAP
configured using `configure --with-gcc (3.2)'
- [ in directory name breaks dired,
Chris Moore <=