Subject: bug#23646: 25.0.94; file-name-completion does not handle completion-ignored-extensions properly

From: Michael Albinus <[email-masked]>
Date: Sun, 29 May 2016 11:19:47 +0200

Michael Albinus <[email-masked]> writes:

> Try the following:
>
> (let ((completion-ignored-extensions ".ext"))
>   (write-region "foo" nil (expand-file-name "foo" "/tmp"))
>   (write-region "foo" nil (expand-file-name "foo.ext" "/tmp"))
>   (file-name-all-completions "fo" "/tmp") ; ("foo" "foo.ext"), OK
>   (file-name-completion "fo" "/tmp") ; "foo", OK
>   (file-name-completion "foo" "/tmp") ; "foo", NOK, should be t
>   (file-name-completion "foo." "/tmp") ; "foo.ext", OK
>   (file-name-completion "foo.ext" "/tmp")) ; t, OK

Silly me: the first line must be

(let ((completion-ignored-extensions '(".ext")))

Everything works as expected. Closing the bug.