[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired cannot access file names with a quote
From: |
Chong Yidong |
Subject: |
Re: dired cannot access file names with a quote |
Date: |
Sat, 23 Feb 2008 17:28:20 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (gnu/linux) |
> The subject describes what I suspect is the cause of the bug, but I am
> not sure, because I made no real investigation
>
> $ touch /tmp/First-October\ \'07.pdf
> $ emacs -Q
> C-x d /tmp/Firs TAB RET
> ==> Listing directory failed but `access-file' worked
I think the fix is to quote ' as well in shell-quote-wildcard-pattern.
Could someone on this list double-check?
*** emacs/lisp/files.el.~1.896.2.37.~ 2008-01-29 13:34:43.000000000 -0500
--- emacs/lisp/files.el 2008-02-23 17:25:50.000000000 -0500
***************
*** 4774,4780 ****
PATTERN is assumed to represent a file-name wildcard suitable for the
underlying filesystem. For Unix and GNU/Linux, the characters from the
! set [ \\t\\n;<>&|()#$] are quoted with a backslash; for DOS/Windows, all
the parts of the pattern which don't include wildcard characters are
quoted with double quotes.
Existing quote characters in PATTERN are left alone, so you can pass
--- 4774,4780 ----
PATTERN is assumed to represent a file-name wildcard suitable for the
underlying filesystem. For Unix and GNU/Linux, the characters from the
! set [ \\t\\n;<>&|()#$'] are quoted with a backslash; for DOS/Windows, all
the parts of the pattern which don't include wildcard characters are
quoted with double quotes.
Existing quote characters in PATTERN are left alone, so you can pass
***************
*** 4806,4812 ****
(concat result (substring pattern beg) "\""))))
(t
(let ((beg 0))
! (while (string-match "[ \t\n;<>&|()#$]" pattern beg)
(setq pattern
(concat (substring pattern 0 (match-beginning 0))
"\\"
--- 4806,4812 ----
(concat result (substring pattern beg) "\""))))
(t
(let ((beg 0))
! (while (string-match "[ \t\n;<>&|()#$']" pattern beg)
(setq pattern
(concat (substring pattern 0 (match-beginning 0))
"\\"
- Re: dired cannot access file names with a quote,
Chong Yidong <=