From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Date: Mon, 04 Nov 2019 17:22:30 +0100 Message-ID: <87h83jy5kp.fsf@gmx.net> References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> <83bltvl55x.fsf@gnu.org> <87o8xvz0hp.fsf@gmx.net> <83tv7mkb0l.fsf@gnu.org> <87d0ea9uxg.fsf@gmx.net> <83eeyphr5q.fsf@gnu.org> <87lfsvyd4i.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="17032"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 11339@debbugs.gnu.org, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 04 17:23:32 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iRf8c-0004Fv-N9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2019 17:23:30 +0100 Original-Received: from localhost ([::1]:35008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRf8b-00081Y-BH for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2019 11:23:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51944) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRf8C-0007wu-2c for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 11:23:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRf8A-0006Lr-LB for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 11:23:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRf8A-0006Ll-Hc for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 11:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iRf8A-0001NL-8n for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2019 11:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2019 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11339 X-GNU-PR-Package: emacs Original-Received: via spool by 11339-submit@debbugs.gnu.org id=B11339.15728845705252 (code B ref 11339); Mon, 04 Nov 2019 16:23:02 +0000 Original-Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 16:22:50 +0000 Original-Received: from localhost ([127.0.0.1]:37416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRf7x-0001Me-OM for submit@debbugs.gnu.org; Mon, 04 Nov 2019 11:22:50 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:38427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRf7w-0001MO-0n for 11339@debbugs.gnu.org; Mon, 04 Nov 2019 11:22:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572884556; bh=rBH2Bkf6O2MXiqfQnyLCzXAlujtv4X3gfyROBwDYDug=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=YuI3XzTpdeg2ZQp4HOy/mk4Dmd52b3J2UQKUJx3a5yHHKVOSKkgmYIlQ39GqlJxPh wG7duKJMADfYwEQqRU4Fc/AVDq5YtuffedZdKICioMdNQfDU9TT/EZee+12Ycnvjn9 sXpBdL2K53Cx9wNCk5s2D3qgSb0e3zOnqCgZELHM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([188.109.197.143]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MLR1f-1iAp3v1bFL-00ITzW; Mon, 04 Nov 2019 17:22:36 +0100 In-Reply-To: <87lfsvyd4i.fsf@gmx.net> (Stephen Berman's message of "Mon, 04 Nov 2019 14:39:25 +0100") X-Provags-ID: V03:K1:3uOqCbXzEGpU7DySVj6XaYP9XkrWBBTjfFVWO7owDyQorV1ZodG 5tT0Mm/T/CbaVSqkfhfLlXziWbuXeXpjYG2Jf61n12F9+gbleZZwEyOf9i58+VUaeE1pyld P9391xktah3IUKhIAt8drLk6W8M+GxsZHu5+VPIaJtVqGvExoFvQHKyZLIeLceZ8qsjr+HO xwT3TNG7o1wkAIb9SRwFA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7VRmO7gQafg=:57XnjjtJTLrYaAtiWYU/OT 55+0e8DdaixhxDsWuhCw3T6JgWfRLiwz4Enom4Qlgu4xRjwdiyzQoG2T1Ri5Z93ZocRZ+Rsoy XAVbViriE37T/HrS/wrc6rVDUKKZ/IDntn41SLAgpyocD/71SbOYQkTg0j8jaKr1A8/LuYqOg b/bfZfaHJWSVqMdkibg3DubB8SYT3w1fxyuBNKKpq43VPTaqJnY06f4+Og1M0jCI0fadbkWNu dEgrSSbnBZCe6NGD1ZrRd5Yac6hV0SDv5nqgWbPpJjFLP9vJsZX6Mcb4zcrNAGDQIFbC9cJPz cOYAJp2vBnyT3LpN0xrYWIWXhf0uP0IVWi5fZem22cHN84LnzIN3ksDoMo2aogw9+uiXQCi53 jsQp5a0RquQan3LnypdZCDWCe8ioly2UjXLQ6va+QxMPZabTBAXftxqVZFQLq+Fijm0b/GBB/ UottOiXN4HYpctLkotSoZNB0dXKeFnMXbgdSRtduSKts5P/NmTg38fRpdjt8JOAdfGjItoqi4 ZIKoj4bq9rlaKklFw3gY3CzL//YYYycKukjjoIKfJG7osnQzPIRrYO7zovq+WjYyB6/H+O0jm FoZMsKgtv0HpL1TGydJZk4WnlIT09nzUNf1MGpjRjVsgEZ3iLGMQK1Zs/ncfOkbqa8GVhq1CW TxRvfpbGPXtWJ+f5kYW+Q/HU3VRRekq7iMH8AJ+lsFIq8Q0rhH4rDkNmWXdm37qcIgchLNznW zpU2M6xlU1IKJHNTmGsWfK1SikD8fY+5pJMNBg6sWGOxLhlsjYX4xHyKZ+JFIJJBqsBHuRq1 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: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:170946 Archived-At: On Mon, 04 Nov 2019 14:39:25 +0100 Stephen Berman = wrote: > On Sun, 03 Nov 2019 18:16:01 +0200 Eli Zaretskii wrote: > >>> From: Stephen Berman >>> Cc: stefan@marxist.se, 11339@debbugs.gnu.org >>> Date: Sat, 02 Nov 2019 16:09:31 +0100 >>>=20 >>> Concerning my followup to my OP, that involved another difference I >>> observed in completion behavior between buffer names and file names with >>> non-ASCII characters when *-completion-ignore-case is non-nil, and >>> that's what the recipe above shows in more detail than in my followup, >>> which didn't explicitly contrast the behavior with ASCII-only characters >>> (the above recipe also uses names that differ beyond the case >>> differences, to avoid the question of expectations where only case >>> differs): with buffer names, all completions are shown regardless of the >>> case of the input, but with file names, completion is done according to >>> the case of the input, i.e. read-file-name-completion-ignore-case >>> appears to have no effect (again, only when the names contain non-ASCII >>> characters). This seems to be a clear bug. >> >> Yes, it was a bug, and a very old one: our case-insensitive comparison >> of file names worked by bytes, which is only TRT for pure-ASCII >> strings. >> >> I hope I fixed this now, please try the latest master. > > I've now updated and, the above bug is now fixed; thanks. I'd like to return to the bevahior I originally reported. I think my previous recapitulation of it was inaccurate, so here are explicit recipes comparing current emacs-26 (representing the situation prior to your fix) and current emacs-master (including your fix). Add test files (crucially differing only in case and "asciiness"): 0. $ touch /tmp/{bah,bAh,b=C3=A4h,b=C3=84h} Before your fix: 1. $ emacs-26 -Q --eval '(setq read-buffer-completion-ignore-case tread-fi= le-name-completion-ignore-case t)' /tmp/{bah,bAh,b=C3=A4h,b=C3=84h} (*Buffer List* show the buffers bah,bAh,b=C3=A4h,b=C3=84h) 2. C-x b *scratch* 3a. C-x b ba TAB =3D> completes to bah and after TAB displays [Sole completion] 3b. C-g C-x b bA TAB =3D> completes to bAh and after TAB displays [Sole completion] 4a. C-g C-x b b=C3=A4 TAB =3D> completes to b=C3=A4h and after TAB displays [Sole completion] 4b. C-g C-x b b=C3=84 TAB =3D> completes to b=C3=84h and after TAB displays [Sole completion] 5a. C-g C-x C-f /tmp/ba TAB =3D> completes to bah and after TAB displays [Complete, but not unique] and *Completions* pops up showing `bAh' and `bah' 5b. C-g C-x C-f /tmp/bA TAB =3D> completes to bAh and after TAB displays [Complete, but not unique] and *Completions* pops up showing `bAh' and `bah' 6a. C-g C-x C-f /tmp/b=C3=A4 TAB =3D> completes to /tmp/b=C3=A4h and after TAB displays [Sole completion] 6a. C-g C-x C-f /tmp/b=C3=84 TAB =3D> completes to /tmp/b=C3=84h and after TAB displays [Sole completion] After your fix: 1. $ emacs-master -Q --eval '(setq read-buffer-completion-ignore-case trea= d-file-name-completion-ignore-case t)' /tmp/{bah,bAh,b=C3=A4h,b=C3=84h} (*Buffer List* show the buffers bah,bAh,b=C3=A4h,b=C3=84h) 2. C-x b *scratch* 3a. C-x b ba TAB =3D> completes to bah and after TAB displays [Sole completion] 3b. C-g C-x b bA TAB =3D> completes to bAh and after TAB displays [Sole completion] 4a. C-g C-x b b=C3=A4 TAB =3D> completes to b=C3=A4h and after TAB displays [Sole completion] 4b. C-g C-x b b=C3=84 TAB =3D> completes to b=C3=84h and after TAB displays [Sole completion] 5a. C-g C-x C-f /tmp/ba TAB =3D> completes to bah and after TAB displays [Complete, but not unique] and *Completions* pops up showing `bAh' and `bah' 5b. C-g C-x C-f /tmp/bA TAB =3D> completes to bAh and after TAB displays [Complete, but not unique] and *Completions* pops up showing `bAh' and `bah' 6a. C-g C-x C-f /tmp/b=C3=A4 TAB =3D> completes to /tmp/b=C3=A4h and after TAB displays [Complete, but no= t unique] and *Completions* pops up showing `bAh' and `bah' 6a. C-g C-x C-f /tmp/b=C3=84 TAB =3D> completes to /tmp/b=C3=84h and after TAB displays [Complete, but no= t unique] and *Completions* pops up showing `bAh' and `bah' So, before your fix file name completion involving non-ASCII strings behaved the same as buffer name completion involving both ASCII-only and non-ASCII strings, but file name completion involving ASCII-only strings differed. Now, after your fix, file name completion involving non-ASCII strings works the same as file name completion involving ASCII-only strings did before your fix and still does after, but all the cases of file name completion differ from the corresponding cases of buffer name completion. I would prefer buffer name completion to work the way file name completion uniformly works after your fix. Steve Berman