From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren 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 23:00:40 +0100 Message-ID: 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> <8337uwucyt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a1144f922dfbcc905275b80a9 X-Trace: ger.gmane.org 1450648881 28346 80.91.229.3 (20 Dec 2015 22:01:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Dec 2015 22:01:21 +0000 (UTC) Cc: random832@fastmail.com, 22169@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 20 23:01:12 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 1aAm2R-0000k6-6N for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Dec 2015 23:01:11 +0100 Original-Received: from localhost ([::1]:42187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAm2Q-0001rw-AJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Dec 2015 17:01:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAm2M-0001ro-A1 for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 17:01:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAm2I-0006vm-8p for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 17:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAm2I-0006vi-57 for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 17:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aAm2H-0008U7-Pa for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 17:01:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Dec 2015 22:01: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.145064884832587 (code B ref 22169); Sun, 20 Dec 2015 22:01:01 +0000 Original-Received: (at 22169) by debbugs.gnu.org; 20 Dec 2015 22:00:48 +0000 Original-Received: from localhost ([127.0.0.1]:58284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAm23-0008TX-Um for submit@debbugs.gnu.org; Sun, 20 Dec 2015 17:00:48 -0500 Original-Received: from mail-vk0-f44.google.com ([209.85.213.44]:35491) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAm22-0008TJ-T5 for 22169@debbugs.gnu.org; Sun, 20 Dec 2015 17:00:47 -0500 Original-Received: by mail-vk0-f44.google.com with SMTP id a189so91611658vkh.2 for <22169@debbugs.gnu.org>; Sun, 20 Dec 2015 14:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JdwlyFiwzttuzW3lkWP7gGjacQd8pnr6KUwK/Cz5jxs=; b=A+Cr34H4DqTYR/4aOff0wH/mxGrULDWYhCs6CzKeQIpU0Nbwmg4ZnK5svUZEyG0mBm 5Gmpi8i3/v0/zWAs4JMV1+iZADFE0or/3hBWfF14c1YRE7NizUKOC5XVxGVPo+NGiu44 TEf4Tb6tNlZeUZwcJ5fy0DmHOJvn8bor50hi9lRLQLfApZQwqnqcQzmVJYal+6yjT1Ar MuLCQbkTMZ40+bGHBH98vj6kY8skbrWpS4KEnH1g36q6vAPDzI6r+MN0OvRi+S7hwZDi tZKKY2X9ICDWLdpvPVZRZM+kDLN2ZoMtKZGB1V9FgZKsT2iYgYBr4rzIJzGgMKI9BUuD pAfQ== X-Received: by 10.31.138.20 with SMTP id m20mr10379679vkd.70.1450648841200; Sun, 20 Dec 2015 14:00:41 -0800 (PST) Original-Received: by 10.31.210.133 with HTTP; Sun, 20 Dec 2015 14:00:40 -0800 (PST) In-Reply-To: <8337uwucyt.fsf@gnu.org> 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:110215 Archived-At: --001a1144f922dfbcc905275b80a9 Content-Type: multipart/alternative; boundary=001a1144f922dfbcb905275b80a7 --001a1144f922dfbcb905275b80a7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I managed to get the attached patch to work (when used in conjunction with my previous patch). I've tested: * C-x C-f a TAB * (find-file-all-competions "a" ".") -- Anders On Sun, Dec 20, 2015 at 8:39 PM, Eli Zaretskii wrote: > > 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 "" ".") > > ("=C3=A5=C3=A4=C3=B6.txt" "aao.txt" "../" "./") > > > > (file-name-all-completions "a" ".") > > ("=C3=A5=C3=A4=C3=B6.txt" "aao.txt") <=3D Incorrect result > > So something's wrong with the patch I wrote, because it was supposed > to reject "=C3=A5=C3=A4=C3=B6.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), afte= r > 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 i= s > 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 "=C3=A5=C3=A4= =C3=B6.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. > --001a1144f922dfbcb905275b80a7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I managed to get the attached patch= to work (when used in conjunction with my previous patch).

<= /div>
I've tested:

* C-x C-f a TAB
* (find-file-all-competions "a" ".")

<= /div>
=C2=A0 =C2=A0 -- Anders


=

On Sun, Dec 20, 2= 015 at 8:39 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Sun, 20 Dec 2015 20:16:29 +0100
> From: Anders Lindgren <andlind= @gmail.com>
> Cc: random832@fastmail.com, 22169@debbugs.gnu.org
>
> Unfortunately, it still doesn't work, the "a" is still d= eleted. You can see
> what happens here:
>
> (file-name-all-completions "" ".")
> ("=C3=A5=C3=A4=C3=B6.txt" "aao.txt" "../"= ; "./")
>
> (file-name-all-completions "a" ".")
> ("=C3=A5=C3=A4=C3=B6.txt" "aao.txt") <=3D Incor= rect result

So something's wrong with the patch I wrote, because it was supp= osed
to reject "=C3=A5=C3=A4=C3=B6.txt" in the last case.=C2=A0 Can yo= u 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), aft= er the
> decoding of the entry, perform a second comparison with the decoded (o= riginal)
> 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<= br> > comparison is only performed if "file" is not empty, so it w= ill not affect
> normal directory retrieval, only when performing a completion operatio= n.
>
> Concretely, in the example above, completing "a" will find b= oth entries which
> are decoded. However, the second comparison will reject "=C3=A5= =C3=A4=C3=B6.txt".

That's exactly what my patch was supposed to do -- it makes a se= cond
comparison right before adding a candidate to the result.=C2=A0 If you can<= br> see why it isn't working, we can take it from there.

Thanks.

--001a1144f922dfbcb905275b80a7-- --001a1144f922dfbcc905275b80a9 Content-Type: text/plain; charset=US-ASCII; name="coding2.diff" Content-Disposition: attachment; filename="coding2.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iif2v2v90 ZGlmZiAtLWdpdCBhL3NyYy9kaXJlZC5jIGIvc3JjL2RpcmVkLmMKaW5kZXggODRiZjI0Ny4uYTJm Mzg4YyAxMDA2NDQKLS0tIGEvc3JjL2RpcmVkLmMKKysrIGIvc3JjL2RpcmVkLmMKQEAgLTYzNyw2 ICs2MzcsMjAgQEAgZmlsZV9uYW1lX2NvbXBsZXRpb24gKExpc3BfT2JqZWN0IGZpbGUsIExpc3Bf T2JqZWN0IGRpcm5hbWUsIGJvb2wgYWxsX2ZsYWcsCiAgICAgICBpZiAoIU5JTFAgKHByZWRpY2F0 ZSkgJiYgTklMUCAoY2FsbDEgKHByZWRpY2F0ZSwgbmFtZSkpKQogCWNvbnRpbnVlOwogCisgICAg ICAvKiBSZWplY3QgZW50cmllcyB3aGVyZSB0aGUgZW5jb2RlZCBzdHJpbmdzIG1hdGNoZWQgYnV0 IHRoZQorICAgICAgICAgZGVjb2RlZCBkb2Vzbid0LiAgQ29uY3JldGVseSwgImEiIHNob3VsZCBu b3QgbWF0Y2ggImEtcmluZyIKKyAgICAgICAgIG9uIGZpbGUgc3lzdGVtIGVuY29kZWQgdXNpbmcg VVRGLTggZGVjb21wb3NlZCBjaGFyYWN0ZXJzLiAqLworICAgICAgTGlzcF9PYmplY3QgemVybyA9 IG1ha2VfbnVtYmVyICgwKTsKKyAgICAgIGlmIChTQ0hBUlMgKGZpbGUpIDw9IFNDSEFSUyAobmFt ZSkpCisgICAgICAgIHsKKyAgICAgICAgICBMaXNwX09iamVjdCBjbXAKKyAgICAgICAgICAgID0g RmNvbXBhcmVfc3RyaW5ncyAobmFtZSwgemVybywgbWFrZV9udW1iZXIgKFNDSEFSUyAoZmlsZSkp LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlLCB6ZXJvLCBtYWtlX251bWJl ciAoU0NIQVJTIChmaWxlKSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBs ZXRpb25faWdub3JlX2Nhc2UgPyBRdCA6IFFuaWwpOworICAgICAgICAgIGlmICghRVEgKGNtcCwg UXQpKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKwogICAgICAgLyogU3VpdGFi bHkgcmVjb3JkIHRoaXMgbWF0Y2guICAqLwogCiAgICAgICBtYXRjaGNvdW50ICs9IG1hdGNoY291 bnQgPD0gMTsKQEAgLTY1MCw3ICs2NjQsNiBAQCBmaWxlX25hbWVfY29tcGxldGlvbiAoTGlzcF9P YmplY3QgZmlsZSwgTGlzcF9PYmplY3QgZGlybmFtZSwgYm9vbCBhbGxfZmxhZywKIAl9CiAgICAg ICBlbHNlCiAJewotCSAgTGlzcF9PYmplY3QgemVybyA9IG1ha2VfbnVtYmVyICgwKTsKIAkgIC8q IEZJWE1FOiBUaGlzIGlzIGEgY29weSBvZiB0aGUgY29kZSBpbiBGdHJ5X2NvbXBsZXRpb24uICAq LwogCSAgcHRyZGlmZl90IGNvbXBhcmUgPSBtaW4gKGJlc3RtYXRjaHNpemUsIFNDSEFSUyAobmFt ZSkpOwogCSAgTGlzcF9PYmplY3QgY21wCg== --001a1144f922dfbcc905275b80a9--