[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs bug with Windows filenames?
From: |
Ehud Karni |
Subject: |
Re: Emacs bug with Windows filenames? |
Date: |
Sat, 11 Nov 2000 18:38:08 +0200 |
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'"
>
> When I renamed the file and removed the brackets, it opened just fine. I
> tried escaping the brackets like "\[1\]" and that didn't work either.>
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