unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ari Roponen <ari.roponen@gmail.com>
To: emacs-devel@gnu.org
Subject: File name completion problem with non-ascii file names
Date: Sun, 27 Apr 2008 13:36:15 +0300	[thread overview]
Message-ID: <m3lk2zbn4w.fsf@gmail.com> (raw)

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




             reply	other threads:[~2008-04-27 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 10:36 Ari Roponen [this message]
2008-04-27 16:16 ` File name completion problem with non-ascii file names 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3lk2zbn4w.fsf@gmail.com \
    --to=ari.roponen@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).