unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ari Roponen <ari.roponen@gmail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: emacs-devel@gnu.org
Subject: Re: File name completion problem with non-ascii file names
Date: Mon, 28 Apr 2008 15:16:35 +0300	[thread overview]
Message-ID: <m3fxt6kwd8.fsf@gmail.com> (raw)
In-Reply-To: <jeiqy3b28w.fsf@sykes.suse.de> (Andreas Schwab's message of "Sun,  27 Apr 2008 20:07:27 +0200")

Andreas Schwab <schwab@suse.de> writes:

> Ari Roponen <ari.roponen@gmail.com> 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




  reply	other threads:[~2008-04-28 12:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=m3fxt6kwd8.fsf@gmail.com \
    --to=ari.roponen@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    /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).