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#38458: 27.0.50; case-insensitive substring completion Date: Mon, 02 Dec 2019 19:56:26 +0100 Message-ID: <87sgm2v9np.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133422"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 38458@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 02 19:57:33 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 1ibqt3-000Ya1-4z for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Dec 2019 19:57:33 +0100 Original-Received: from localhost ([::1]:43454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibqt1-0002Mk-Ga for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Dec 2019 13:57:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36103) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibqsZ-0002MN-Ar for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:57:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibqsY-0000QO-2D for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:57:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32971) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibqsX-0000QK-V6 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ibqsX-00059D-Sp for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:57:01 -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, 02 Dec 2019 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38458 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157531299619734 (code B ref -1); Mon, 02 Dec 2019 18:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Dec 2019 18:56:36 +0000 Original-Received: from localhost ([127.0.0.1]:38944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibqs7-00058E-PB for submit@debbugs.gnu.org; Mon, 02 Dec 2019 13:56:36 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:53192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibqs6-000584-18 for submit@debbugs.gnu.org; Mon, 02 Dec 2019 13:56:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36033) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibqs4-0002I1-J6 for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:56:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibqs3-0007gU-8T for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:56:32 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:37785) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibqs2-0007aI-Qb for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2019 13:56:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575312987; bh=9YUOJsoMpO4vmBaBMLcr2VacnA/mCSsjStvzKmv42f0=; h=X-UI-Sender-Class:From:To:Subject:Date; b=J8+gdmr4Ce/DlrEeNNlPrJzKtboeocu7ojBc2Dgsi+7qvj284YEcJJXjl/JFDsfPR 4SRGHpqc9vENs4OeY4YrLvi+JLMBQJattaoyzlGcIisUW54HWHykFmwEg2LEh5QzXb qO+wTtPXNeHL9wEmXeTaMgerEctBkUCsxu9sxqHA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([188.109.175.134]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MUXpK-1iBQ2F30AC-00QPDP for ; Mon, 02 Dec 2019 19:56:27 +0100 X-Provags-ID: V03:K1:W4Hke7kqDDRKROMKMwBQmaCYDGscKHNzkNIqMrU84vGKJdIy9wf Zhl70PQWTJ7HZWgVQVj1NH/6ddEfe4egrxSJJdPxqb+7ftm8f7tg/YpOuEBTW6rc9e1b+yr 3AitP29SGMTQm0+QJzbNwx9H0E2HgCEH59CgTVLnZVCfIoVcedHTPCZ3Jc2Udv5TxCOmm2R Ka9I3O23TA/q2aUzollSg== X-UI-Out-Filterresults: notjunk:1;V03:K0:JF4KyZqOo6Q=:V2VfgTKGp+YrMLX9gCsJBn 22JszKZpNm1RNf6k4ZpW/aRBU89DCPynOHmPlmhsPj5JZlnv0g0/XbAmTt12rYMrEc3XWm4K4 l1WlyTnARTokpV2KAqbzOKUzlqjcN8RyEkj4SnAYr1aeooYMAVN09LHHAerkv4KGvT/IN9QmC 66ElfdjOON0sSeIPMr9AtPkc9JgP8QGy42JZ63EjQ7+Lt/8dIuTA5bs1qHG+cHxujJIoYli5+ u7TCdANjjWBSutMVt0f64M5A3xapPkclZl23ogsdu7SPrgZu5V2D4OjSssVpaCDbN31W7vgq0 10yjAd/14ISVXU53KB2tUcsauYGwqIc3dYngpYxsZJ2qOaGB8kD/PrYPyBgaA4G/Qk4RuRqDq Kn3gBXG6u+JooyD4MEt/GuSYsDCg47k5+UXhXlcc3+JT/V/7M4+EhdNJqDapZvSwba7+QRhpv 7k8F/BwotbqH2rs5zWpFTtWc9dMj8ZIrfRiZuXYqUnLpTLT6/GHRjr2o9mitkCaFFTirA2ymR jOpMWUs+MZ2836QyG42D5v5Ihb7FDlQqD00lQTifldwcoGOS4UEddCSAgPvIm7GBmNeN6LAl6 wjmuJ0dvILjg4+1hIRZFttSVvSojWWZv47uR+nWfUxvFNbGd2BeDUD55KivP/ITkCw8XF5WRD Xp5/XCbXAQvMZQEFGe5y1879q/KIbkan0cIz/d2o8fUT9Pz+acRyyGZTbEhKggrf3cun8UT1P lr9MEyjYCG9FGreAlQgVJuph2Otc7uLXg6/W84FF24GNw6ku7I5JrwfhdxC3TBM8DTWYshMY X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] 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:172783 Archived-At: Typing TAB for case-insensitive substring completion of file and buffer names can put the cursor in the wrong position in the minibuffer. To reproduce: 0. $ mkdir /tmp/test; touch /tmp/test/{testing,Testing} 1. $ emacs-master -Q --eval "(setq read-buffer-completion-ignore-case t read-file-name-completion-ignore-case t completion-category-overrides '((buffer (styles substring)) (file (styles substring))))" 2. Type `C-x C-f /tmp/test/tes TAB' =3D> The minibuffer displays this, with point (^) after `s' in `testing': Find file: /tmp/test/testing ^ 3. Visit /tmp/test/testing and /tmp/test/Testing, then from a buffer other than these, e.g. /temp/test, type `C-x b tes TAB' =3D> The minibuffer displays this, with point (^) after `s' in `testing': Switch to buffer (default *scratch*): testing ^ I think these are unintended side effects of these two changes: commit 0b21ecdb5ea9db8cf7a4a4ee59b29bf6273f2915 Author: Eli Zaretskii Date: Sun Nov 3 18:08:45 2019 +0200 Fix case-insensitive completion of non-ASCII file names * src/dired.c (scmp): Comment on (non)applicability to comparisons of non-ASCII strings case-insensitively. (file_name_completion): Decode early the file names read from the directory, and use the decoded names for comparison when letter-case should be ignored. (Bug#11339) commit f2019fc676c2206bbdc53855e3bc4f1086676d3d Author: Eli Zaretskii Date: Sat Nov 9 21:56:30 2019 +0200 Fix case-insensitive completion of buffer names * test/src/minibuf-tests.el (test-try-completion-ignore-case): New test, suggested by Stefan Monnier . * src/minibuf.c (Ftry_completion): Don't treat strings that are identical but for the case as if they were identical for the purposes of not counting the same string twice. This fixes case-insensitive completion when all the candidates are identical but for the letter-case. (Bug#11339) In builds prior to the first change, after step 2 the minibuffer displays this, with point (^) after `g' in `testing': Find file: /tmp/test/testing ^ This is also the result without file name substring completion, i.e., omitting the setting of completion-category-overrides. For reasons I don't understand, according to my testing, after the second change it is necessary to make the buffer substring setting of completion-category-overrides to get the effect in step 3, although substring completion of buffer names is included in completion-category-defaults. (In builds prior to the second change, after step 3 the minibuffer shows `testing' as the only completion, because case-insensitive completion of buffer names didn't work prior to this change.) In GNU Emacs 27.0.50 (build 27, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, = cairo version 1.16.0) of 2019-12-01 built on strobe-lfs84 Repository revision: 9f2145f42daab13aed5cf89fdb6a7c5579819ec0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: Linux From Scratch