From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ari Roponen Newsgroups: gmane.emacs.devel Subject: Re: File name completion problem with non-ascii file names Date: Mon, 28 Apr 2008 15:16:35 +0300 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1209396207 26888 80.91.229.12 (28 Apr 2008 15:23:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Apr 2008 15:23:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 28 17:24:03 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JqVBM-0007Ri-Ac for ged-emacs-devel@m.gmane.org; Mon, 28 Apr 2008 17:22:20 +0200 Original-Received: from localhost ([127.0.0.1]:35513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqVAf-0002Mo-Lk for ged-emacs-devel@m.gmane.org; Mon, 28 Apr 2008 11:21:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqSHq-0006Rq-TY for emacs-devel@gnu.org; Mon, 28 Apr 2008 08:16:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqSHp-0006Qr-Ef for emacs-devel@gnu.org; Mon, 28 Apr 2008 08:16:50 -0400 Original-Received: from [199.232.76.173] (port=49598 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqSHp-0006Qo-C6 for emacs-devel@gnu.org; Mon, 28 Apr 2008 08:16:49 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JqSHp-0004zv-1h for emacs-devel@gnu.org; Mon, 28 Apr 2008 08:16:49 -0400 Original-Received: by ug-out-1314.google.com with SMTP id a2so957485ugf.48 for ; Mon, 28 Apr 2008 05:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:content-transfer-encoding; bh=FaJCHq4F1U3t83ylXo7P0O/RECWYZhbkRxPoowjYXWU=; b=sii6BVUubRpM6wzT66NIE1XE3t32T4C328p1kSyTFkM6FUQfI0oPRCKGSFXtGtln8P3cbAI2XF6FpfRpgq51UfndowTupBNGM0SPKrTstUjIgiGX5orYqi1JG+Mx5cmMoxRU3DBIznbIbiYc934pw8w8RKjEZAPwvBIYOUaJt6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:content-transfer-encoding; b=UXzuHfkRdXVqIcy4i5l516+zP7GZssaFbADNjFh4cACIjiQRBu37mPwP2Apg2/4jFoATGbZ7v+HF0m6nvEjFMH/ToqTNTuIycc6JxZZ90qKm3aleRozSyUC4L6jK5fniMn1qwunYRHnLVhHVhaHFxVFd59ugAgPgsEMcV2kYJwc= Original-Received: by 10.67.94.19 with SMTP id w19mr4787974ugl.58.1209385007140; Mon, 28 Apr 2008 05:16:47 -0700 (PDT) Original-Received: from arirop ( [88.195.184.136]) by mx.google.com with ESMTPS id y34sm9599474iky.6.2008.04.28.05.16.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Apr 2008 05:16:46 -0700 (PDT) In-Reply-To: (Andreas Schwab's message of "Sun, 27 Apr 2008 20:07:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Mon, 28 Apr 2008 11:20:33 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96071 Archived-At: Andreas Schwab writes: > Ari Roponen 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=C3=B6yt=C3=A4-1.txt" >> (insert "P=C3=B6yt=C3=A4 is a Finnish word for table.")) >> (with-temp-file "p=C3=B6yt=C3=A4-2.txt" >> (insert "Other file.")) >> (file-name-completion "p" ".")) >> ;; =3D> "p=C3=B6yt=C3=A4-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=C3=B6yt=C3=A4-1.txt")) (with-temp-file file (insert "test file")) (file-name-completion file default-directory)) ;; =3D> "p=C3=B6yt=C3=A4-1.txt" According to documentation, file-name-completion should return t, because there is only one possible completion: =20=20=20=20 (directory-files temporary-file-directory nil "p=C3=B6yt=C3=A4-1") ;; =3D> ("p=C3=B6yt=C3=A4-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)) ;; =3D> 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 --=20 Ari Roponen