unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* File name completion problem with non-ascii file names
@ 2008-04-27 10:36 Ari Roponen
  2008-04-27 16:16 ` Drew Adams
  2008-04-27 18:07 ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Ari Roponen @ 2008-04-27 10:36 UTC (permalink / raw)
  To: emacs-devel

Hi,

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."
    
I expected the result to be "pöytä-" without "1.", since there
are two possible completions:

    (directory-files temporary-file-directory nil "^p")
    ;; => ("pöytä-1.txt" "pöytä-2.txt")

This problem shows up when I try to find the file with C-x C-f:

    C-x C-f /tmp/p TAB

completes to "/tmp/pöytä-1.". Second TAB completes
to "/tmp/pöytä-1.txt" and third displays "[sole completion]". I
expected the first TAB complete to "/tmp/pöytä-" and second TAB
to display two possible completions.

This happens on: GNU Emacs 23.0.60.6 (i686-pc-linux-gnu, GTK+
Version 2.12.9) of 2008-04-26 on arirop

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

-- 
Ari Roponen




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-29 10:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 10:36 File name completion problem with non-ascii file names Ari Roponen
2008-04-27 16:16 ` Drew Adams
2008-04-27 18:07 ` Andreas Schwab
2008-04-28 12:16   ` Ari Roponen
2008-04-28 18:41     ` Andreas Schwab
2008-04-29 10:17       ` Ari Roponen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).