[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still bugs in read-file-name completion on w32

From: Mathias Dahl
Subject: Re: Still bugs in read-file-name completion on w32
Date: Fri, 21 Apr 2006 13:26:57 +0200

> Eval this code and try to complete in a directory with only one file,
> but not matching the pattern (ie temp.tmp):
>    (defcustom nxhtml-image-completion-pattern
>      "\\.\\(?:png\\|jpg\\|jpeg\\|gif\\)$"
>      "Pattern for matching image URLs in completion."
>      :type 'regexp)
>    (defun nxhtml-image-url-predicate(url)
>      (setq nxhtml-predicate-error nil)
>      (if (or (file-directory-p url)
>              (string-match nxhtml-image-completion-pattern url))
>          t
>        (setq nxhtml-predicate-error "Does not match image file name
> pattern.")
>        nil))
>    (read-file-name "File: " nil "" nil "" 'nxhtml-image-url-predicate)
> For me this completes to the file temp.tmp. This is on w32:
> GNU Emacs (i386-mingw-nt5.0.2195) of 2006-04-15
> I do not know if this bug affects other platforms too, please test.

It does not affect me on Windows. These are the files matcing "test" in c:\:

test av mellanslag.txt             test.doc.PPT
test.html                          test.html~
test.jpg                           test.txt
test.txt~                          test.zip
test1.txt                          test2.txt

If I use normal find-file I can select one of them. With your code
above I can only select the test.jpg file.

My version:

GNU Emacs (i386-mingw-nt5.1.2600) of 2005-06-26 on NONIQPC


reply via email to

[Prev in Thread] Current Thread [Next in Thread]