GNU bug report logs - #23646
25.0.94; file-name-completion does not handle completion-ignored-extensions properly

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Sun, 29 May 2016 09:01:02 UTC

Severity: normal

Tags: notabug

Found in version 25.0.94

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 23646 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: 23646 <at> debbugs.gnu.org
Subject: Re: bug#23646: 25.0.94;
 file-name-completion does not handle completion-ignored-extensions
 properly
Date: Sun, 29 May 2016 11:19:47 +0200
Michael Albinus <michael.albinus <at> gmx.de> 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.




This bug report was last modified 9 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.