From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22169: 25.0.50; File name compiletion doesn't work with non-ASCII characters on OS X Date: Sun, 20 Dec 2015 21:39:06 +0200 Message-ID: <8337uwucyt.fsf@gnu.org> References: <83y4cw3kie.fsf@gnu.org> <83twnk3fg1.fsf@gnu.org> <83oads2x99.fsf@gnu.org> <83io3z3drh.fsf@gnu.org> <831tan32q2.fsf@gnu.org> <83r3ikxmis.fsf@gnu.org> <83fuyxt35q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1450640363 2762 80.91.229.3 (20 Dec 2015 19:39:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Dec 2015 19:39:23 +0000 (UTC) Cc: random832@fastmail.com, 22169@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 20 20:39:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aAjoz-0003X9-Jl for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Dec 2015 20:39:09 +0100 Original-Received: from localhost ([::1]:41818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAjoy-0003FI-M8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Dec 2015 14:39:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAjov-0003FA-87 for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 14:39:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAjor-0003cn-Uq for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 14:39:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAjor-0003ce-RN for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 14:39:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aAjor-0003Vh-Jn for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 14:39:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Dec 2015 19:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22169 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22169-submit@debbugs.gnu.org id=B22169.145064032813474 (code B ref 22169); Sun, 20 Dec 2015 19:39:01 +0000 Original-Received: (at 22169) by debbugs.gnu.org; 20 Dec 2015 19:38:48 +0000 Original-Received: from localhost ([127.0.0.1]:58224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAjoe-0003VG-4d for submit@debbugs.gnu.org; Sun, 20 Dec 2015 14:38:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55199) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAjoc-0003V4-TE for 22169@debbugs.gnu.org; Sun, 20 Dec 2015 14:38:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAjoU-0003Zg-DD for 22169@debbugs.gnu.org; Sun, 20 Dec 2015 14:38:41 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAjoU-0003Zc-9V; Sun, 20 Dec 2015 14:38:38 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4707 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aAjoT-00064X-3H; Sun, 20 Dec 2015 14:38:37 -0500 In-reply-to: (message from Anders Lindgren on Sun, 20 Dec 2015 20:16:29 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110213 Archived-At: > Date: Sun, 20 Dec 2015 20:16:29 +0100 > From: Anders Lindgren > Cc: random832@fastmail.com, 22169@debbugs.gnu.org > > Unfortunately, it still doesn't work, the "a" is still deleted. You can see > what happens here: > > (file-name-all-completions "" ".") > ("åäö.txt" "aao.txt" "../" "./") > > (file-name-all-completions "a" ".") > ("åäö.txt" "aao.txt") <= Incorrect result So something's wrong with the patch I wrote, because it was supposed to reject "åäö.txt" in the last case. Can you see why it didn't? > I gave this a bit of thinking, would the following work: > > - For each match of the current system (using encoded comparison), after the > decoding of the entry, perform a second comparison with the decoded (original) > version of "file" (when not empty). > > There is no extra decoding included, as the number of entries decoded is the > same as before (even if some entries will be rejected now). The extra > comparison is only performed if "file" is not empty, so it will not affect > normal directory retrieval, only when performing a completion operation. > > Concretely, in the example above, completing "a" will find both entries which > are decoded. However, the second comparison will reject "åäö.txt". That's exactly what my patch was supposed to do -- it makes a second comparison right before adding a candidate to the result. If you can see why it isn't working, we can take it from there. Thanks.