[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File name completion problem with non-ascii file names
From: |
Ari Roponen |
Subject: |
Re: File name completion problem with non-ascii file names |
Date: |
Mon, 28 Apr 2008 15:16:35 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Andreas Schwab <address@hidden> writes:
> Ari Roponen <address@hidden> writes:
>
>> when I use C-x C-f to visit a file, TAB-completion completes too
>> much if there are non-ascii characters in file name. Here is a
>> simple recipe to demonstrate the problem:
>>
>> (let ((default-directory temporary-file-directory))
>> (with-temp-file "pöytä-1.txt"
>> (insert "Pöytä is a Finnish word for table."))
>> (with-temp-file "pöytä-2.txt"
>> (insert "Other file."))
>> (file-name-completion "p" "."))
>> ;; => "pöytä-1."
>
> Should be fixed now.
>
> Andreas.
The problem I reported is indeed fixed. However, there is still a
minor problem:
(let ((default-directory temporary-file-directory)
(file "pöytä-1.txt"))
(with-temp-file file (insert "test file"))
(file-name-completion file default-directory))
;; => "pöytä-1.txt"
According to documentation, file-name-completion should return t,
because there is only one possible completion:
(directory-files temporary-file-directory nil "pöytä-1")
;; => ("pöytä-1.txt")
If there are no non-ascii characters in file name, everything
works fine:
(let ((default-directory temporary-file-directory)
(file "poyta-1.txt"))
(with-temp-file file (insert "test file"))
(file-name-completion file default-directory))
;; => t
This happens with GNU Emacs 23.0.60.10 (i686-pc-linux-gnu, GTK+
Version 2.12.9) of 2008-04-28 on arirop
--
Ari Roponen