[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Emacs bug with `[' in filenames
From: |
Ehud Karni |
Subject: |
Emacs bug with `[' in filenames |
Date: |
Mon, 13 Nov 2000 11:20:50 +0200 |
Eli Zaretskii <eliz@is.elta.co.il> suggested at Nov 11, 2000:
> This should be posted to gnu.emacs.bug. I think it also deserves to
> be mentioned in the manual.
On Fri, 10 Nov 2000 11:09:59 -0800, Todd Wells <toddw@wrq.com> wrote:
>
> I attempted to open a file named "viewSessionUpdate[1].txt" with Emacs on
> the Windows NT platform -- using C-x F it did a successful tab-completion of
> the filename, but when I hit Enter it said "No files match
> `k:/AppConnTester/viewSessionUpdate[1].txt'"
The problem exist in UNIX too. I created a file named "abc[x]" and
checked `find-file' (C-x C-f) on it in various ways. Trying to find
it in the exact name quoted in different ways (i.e abc[x], abc\[x\[,
abc\\[x\\], "abc[x]") does not work. Finding it with wildcards (i.e.
abc*, abc?x?) DOES work.
The problem is that when called interactively `find-file' always call
`find-file-noselect' with wildcards set to non nil, and this cause
`find-file-noselect' to try to match "abc[x]" which fails (because
I don't have a file name `abcx'). I patched the `find-file' function
so if I call it by: C-u C-x C-f it sets wildcards to nil and then it
finds `abc[x]'. The patch is the 4 following lines:
(and wildcards
(numberp wildcards)
(/= wildcards 1)
(setq wildcards nil))
Another way to bypass this problem is to visit the file from `dired'
(which also calls `find-file' but always with wildcards turned off).
Ehud.
--
@@@@@@ @@@ @@@@@@ @ @ Ehud Karni Simon & Wiesel Insurance agency
@ @ @ @@ @ Tel: +972-3-6212-757 Fax: +972-3-6292-544
@ @ @ @ @ @@ (USA) Fax and voice mail: 1-815-5509341
@ @ @ @ @ @ Better Safe Than Sorry
http://www.simonwiesel.co.il mailto:ehud@unix.simonwiesel.co.il
- Emacs bug with `[' in filenames,
Ehud Karni <=