From unknown Mon Jun 16 23:54:10 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#11339 <11339@debbugs.gnu.org> To: bug#11339 <11339@debbugs.gnu.org> Subject: Status: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Reply-To: bug#11339 <11339@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:54:10 +0000 retitle 11339 24.1.50; read-{buffer,file-name}-completion-ignore-case fails= on non-ascii reassign 11339 emacs submitter 11339 Stephen Berman severity 11339 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 25 11:38:58 2012 Received: (at submit) by debbugs.gnu.org; 25 Apr 2012 15:38:58 +0000 Received: from localhost ([127.0.0.1]:52885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SN4Iz-0003S4-Kt for submit@debbugs.gnu.org; Wed, 25 Apr 2012 11:38:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34805) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SN4Iw-0003Rr-57 for submit@debbugs.gnu.org; Wed, 25 Apr 2012 11:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SN4Hy-0005s7-5w for submit@debbugs.gnu.org; Wed, 25 Apr 2012 11:37:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN4Hy-0005rx-3H for submit@debbugs.gnu.org; Wed, 25 Apr 2012 11:37:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SN4Ht-0001pJ-7c for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 11:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SN4Hm-0005qA-Nq for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 11:37:48 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:58520) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SN4Hm-0005pf-EW for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2012 11:37:42 -0400 Received: (qmail invoked by alias); 25 Apr 2012 15:37:40 -0000 Received: from i59F5438B.versanet.de (EHLO escher.home) [89.245.67.139] by mail.gmx.net (mp002) with SMTP; 25 Apr 2012 17:37:40 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18MTMAF86kMdNAvzrzxbR/0SuHvuFtPstceCv4/kV n0LysK/osl6hrx From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Date: Wed, 25 Apr 2012 17:37:38 +0200 Message-ID: <87ehrbyg8t.fsf@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) -1. cd /tmp; touch b=C3=A4h b=C3=84h bla 0. emacs -Q 1. M-x customize-option RET read-buffer-completion-ignore-case RET. Toggle to "on", set for the current session. M-x customize-option RET read-file-name-completion-ignore-case RET. Toggle to "on", set for the current session. 2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla b=C3= =84h b=C3=A4h.=20=20=20=20=20=20=20=20=20 3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scratch*= and repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results. 4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h". 7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f' with `C-x b' =3D> same results. In GNU Emacs 24.1.50.1 (i686-suse-linux-gnu, GTK+ Version 2.24.7) of 2012-04-18 on escher Bzr revision: 107959 cyd@gnu.org-20120418070052-e6bm11h52qja62ue Windowing system distributor `The X.Org Foundation', version 11.0.11004000 Configured using: `configure '--without-toolkit-scroll-bars' 'CFLAGS=3D-g'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dlocal locale-coding-system: utf-8-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 08 18:08:41 2013 Received: (at 11339) by debbugs.gnu.org; 8 Jul 2013 22:08:41 +0000 Received: from localhost ([127.0.0.1]:40304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UwJbs-0005Rc-RH for submit@debbugs.gnu.org; Mon, 08 Jul 2013 18:08:41 -0400 Received: from mout.gmx.net ([212.227.17.22]:50579) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UwJbq-0005RL-2q for 11339@debbugs.gnu.org; Mon, 08 Jul 2013 18:08:39 -0400 Received: from rosalinde.fritz.box ([89.245.117.113]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MEWPx-1UyBHz1eAr-00Fo6c for <11339@debbugs.gnu.org>; Tue, 09 Jul 2013 00:08:31 +0200 From: Stephen Berman To: 11339@debbugs.gnu.org Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii References: <87ehrbyg8t.fsf@escher.home> Date: Tue, 09 Jul 2013 00:08:29 +0200 In-Reply-To: <87ehrbyg8t.fsf@escher.home> (Stephen Berman's message of "Wed, 25 Apr 2012 17:37:38 +0200") Message-ID: <87d2qsaen6.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:iaHCkyyceCjkdXQ3NxoSVmQ8qMiidZSxRfqUK2/sZVkUoMyDoTq JibucSWE63QowdKayecBWBrQqngBRLTetaHz2UFb4phLm/5J/uJxxP4uTH8W7hejQNqMvjw VfPKYWlrLRtNaNJ8DQen82vNovQMalc1A2UET6qRSSx5LwLhXA0kwPTxLvYngsWlA3f0LwF bZo7vY5uAuc+SVotWcI/g== X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 11339 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) On Wed, 25 Apr 2012 17:37:38 +0200 Stephen Berman = wrote: > -1. cd /tmp; touch b=C3=A4h b=C3=84h bla > 0. emacs -Q > 1. M-x customize-option RET read-buffer-completion-ignore-case RET. > Toggle to "on", set for the current session. > M-x customize-option RET read-file-name-completion-ignore-case RET. > Toggle to "on", set for the current session. > 2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla b= =C3=84h b=C3=A4h.=20=20=20=20=20=20=20=20=20 > 3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scratc= h* and > repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results. > 4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 > 5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > 6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h". > 7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f' > with `C-x b' =3D> same results. This bug still exists in the current trunk. I have an additional observation, which I don't know if I just overlooked in my OP or if there's been a code change since then that's responsible for this observation: if only one of the files `b=C3=A4h' and `b=C3=84h' is being vi= sited, then `C-x b' completes correctly regardless of the case of the input; i.e., if only `b=C3=84h' is in a buffer `C-x b b=C3=A4 TAB' completes to it= , and likewise, if only `b=C3=A4h' is in a buffer `C-x b b=C3=84 TAB' completes t= o it. But if only one of the files `b=C3=A4h' and `b=C3=84h' exists, `C-x C-f' st= ill only completes if the case of the input matches the case of the file name, as above. Here is part of the call chain of find-file: find-file (files.el) -> find-file-read-args -> read-file-name (minibuffer.el) -> read-file-name-default -> completing-read -> read-file-name-internal -> completion-table-in-turn -> completion--file-name-table -> completion-file-name-table -> file-name-completion (dired.c) -> file_name_completion -> fast_string_match_ignore_case (search.c) -> compile_pattern with argument Vascii_canon_table The argument Vascii_canon_table looks suspicious, but maybe it's already been overridden earlier, though I don't see where; or maybe I just don't understand its import here. Anyway, the call chain of switch-to-buffer is quite different: switch-to-buffer (window.el) -> read-buffer-to-switch -> internal-complete-buffer-except (minibuffer.el) -> internal-complete-buffer (minibuf.c) -> (try-completion | all-completions | test-completion) -> Fcompare_strings (file_name_completion also calls Fcompare_strings later, but there's no use of Vascii_canon_table there.) I don't know how to debug this. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 15:57:39 2019 Received: (at 11339) by debbugs.gnu.org; 1 Nov 2019 19:57:39 +0000 Received: from localhost ([127.0.0.1]:57235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd3C-0000VH-O1 for submit@debbugs.gnu.org; Fri, 01 Nov 2019 15:57:39 -0400 Received: from host.gofardesign.uk ([208.79.239.190]:40255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd3B-0000V0-9R; Fri, 01 Nov 2019 15:57:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EGx8P+Ww/5gfhmAw7PU4fXnhjmoefQbBtDb8XkSnRiQ=; b=XH+CDxfAAFKmA0Jhvm5zSNRnvB H9AN/LVyn/x5rM2q/7lLUNRkC6U6AL9uLoGRHaM8tkKZH39VGWLY7RGsY68Lqq4UrgZjHN+eNju0q lguss0h2HC+HGCX+d9ZxCXqXg9S9PnjyAXO6EEMEFVWC/bIO5FitQTRuallvW/fHL4JE=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:57124 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iQd35-0007r7-G5; Fri, 01 Nov 2019 14:57:32 -0500 From: Stefan Kangas To: Stephen Berman Subject: Re: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii In-Reply-To: <87ehrbyg8t.fsf@escher.home> (Stephen Berman's message of "Wed, 25 Apr 2012 17:37:38 +0200") References: <87ehrbyg8t.fsf@escher.home> Date: Fri, 01 Nov 2019 20:57:30 +0100 Message-ID: <87lfszxtcl.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) found 11339 27.0.50 thanks Stephen Berman writes: > -1. cd /tmp; touch b=C3=A4h b=C3=84h bla > 0. emacs -Q > 1. M-x customize-option RET read-buffer-completion-ignore-case RET. > Toggle to "on", set for the current session. > M-x customize-option RET read-file-name-completion-ignore-case RET. > Toggle to "on", set for the current session. > 2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla b= =C3=84h b=C3=A4h.=20=20=20=20=20=20=20=20=20 > 3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scratc= h* and > repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results. > 4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 > 5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > 6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h". > 7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 > 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f' > with `C-x b' =3D> same results. I can reproduce this on current master using the simpler recipe: 0. emacs -Q 1. Evaluate (setq read-buffer-completion-ignore-case t) 2. C-x b b=C3=A4h RET 3. C-x b b=C3=84h RET 4. C-x b b=C3=A4 TAB TAB Result: Completes to "b=C3=A4h" on first TAB, and on second TAB [Sole completion] is displayed in minibuffer. Expected result: The "*Completion*" buffer is displayed. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 16:20:46 2019 Received: (at 11339) by debbugs.gnu.org; 1 Nov 2019 20:20:46 +0000 Received: from localhost ([127.0.0.1]:57286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQdPZ-0005FT-SG for submit@debbugs.gnu.org; Fri, 01 Nov 2019 16:20:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQdPY-0005FG-NO for 11339@debbugs.gnu.org; Fri, 01 Nov 2019 16:20:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQdPT-0002Zp-Cc; Fri, 01 Nov 2019 16:20:39 -0400 Received: from [176.228.60.248] (port=4355 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQdPS-0004V7-Qg; Fri, 01 Nov 2019 16:20:39 -0400 Date: Fri, 01 Nov 2019 22:20:42 +0200 Message-Id: <83bltvl55x.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-reply-to: <87lfszxtcl.fsf@marxist.se> (message from Stefan Kangas on Fri, 01 Nov 2019 20:57:30 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Fri, 01 Nov 2019 20:57:30 +0100 > Cc: 11339@debbugs.gnu.org > > > 0. emacs -Q > > 1. M-x customize-option RET read-buffer-completion-ignore-case RET. > > Toggle to "on", set for the current session. > > M-x customize-option RET read-file-name-completion-ignore-case RET. > > Toggle to "on", set for the current session. > > 2. C-x C-f b TAB => *Completions* buffer contains, as expected: bla bÄh bäh. > > 3. Visit files `bla', `bäh' and `bÄh', switch to buffer *scratch* and > > repeat step 2, replacing `C-x C-f' with `C-x b' => same results. > > 4. C-x C-f bä TAB => Emacs completes the input to "bäh". > > 5. TAB => Emacs incorrectly reports: "[Sole completion]". > > 6. C-x C-f bÄ TAB => Emacs completes the input to "bÄh". > > 7. TAB => Emacs incorrectly reports: "[Sole completion]". > > 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f' > > with `C-x b' => same results. > > I can reproduce this on current master using the simpler recipe: > > 0. emacs -Q > 1. Evaluate (setq read-buffer-completion-ignore-case t) > 2. C-x b bäh RET > 3. C-x b bÄh RET > 4. C-x b bä TAB TAB > > Result: Completes to "bäh" on first TAB, and on second TAB [Sole > completion] is displayed in minibuffer. > > Expected result: The "*Completion*" buffer is displayed. I think your expectations are incorrect in this case. Try having buffer names that differ (not in letter-case) in the 3rd letter. What I see here is entirely expected and reasonable. I see no bug. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 18:38:16 2019 Received: (at 11339) by debbugs.gnu.org; 1 Nov 2019 22:38:16 +0000 Received: from localhost ([127.0.0.1]:57434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQfYe-0002xJ-8t for submit@debbugs.gnu.org; Fri, 01 Nov 2019 18:38:16 -0400 Received: from mout.gmx.net ([212.227.15.15]:51365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQfYY-0002wx-FX for 11339@debbugs.gnu.org; Fri, 01 Nov 2019 18:38:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572647880; bh=6BqFhv1U6Ey+fkbwSvOAesagkE5wdWA2ZgzoWaY+uQI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=lgsCJmzpVdOcLEmk8YBprOKhrzIBaJ9f5jij8Q2++QbSezk6bJQYXuE6Ax1mIvHfC A+8aTtPgErG5Op2hA+8APhPbOIG0BFy3zRAQOTVm3eEujSUrGtTg5q3Pf72qUX37Ep dz9ao8rOrqCzVALHueaHHl/3MBaJ0TCLnfm4lyYg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([188.101.25.183]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQMuR-1ieC4H1Knh-00MKSP; Fri, 01 Nov 2019 23:38:00 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> <83bltvl55x.fsf@gnu.org> Date: Fri, 01 Nov 2019 23:37:54 +0100 In-Reply-To: <83bltvl55x.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 Nov 2019 22:20:42 +0200") Message-ID: <87o8xvz0hp.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rlF7kkMcp3fE80xgVAyefNbM1VzNILptHuYUsSE8ysmtaOAqh7y X79cC4Lnxoctmwa6tzWQmgDKf+0ljPXserXMLaIF44YZrb+gy6L/XH2BRbl0JLgx7gm6xyU j7NCo71xgf2hqlnCo21QmW0iMkjE+9uEbBcsQjaHmE+oXKZzP4gOxMdoWWKzFBYJmao0g69 M+M3T5aXCyyHuU0M8a6hQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:n85R7p8VLCw=:+YQg1j7Tuvhd2kxq0rV+oR UTGgvzJTSSSfuHQe0coIrECbbOh2dkEWwWxJwH5817ysZPaPMacl2MKeTdlJ2PlRrmZ7zi9Hb UT/VY6nGByEDRGQ2GBSF6zOOFTi+riwwAMIbTktwsJ3VKu120ditufXd+yp9yNdwxQYLENHa5 Jn+OuQfLQGF0oiuQ03AsL3qtuDj/QF9IgTJYzd6Vv9NLa3DQ8B0nwUs977VTRDhGMDs4XZ2ec lgcfSVgh4qr1ngMIy5wQQBPgKWDIdebqnD29OmGJPMsz44i3UkoePzMSKjem8qrl6dILKRjp0 lyj2kXFGIWWb9hAiNhftYmx06oOrI6f6oukO/3u9ZFN/ZsN1iTIA2Lj13tp9SWcLcGC0ga6LO vfgKt+qLTCJz0KfaMhZUHlDoxue9OTkgs5AwnPtmXewY3c2DMVSPjPffdldQfhc5gA5mJmhj2 S0jzI9DRrzv7tVDh3DVwzFBuwtRvcZzdhYZd+dHexBnsw5G29UB2TNMmTbLV5mWA7p6LZH91p uzMSiTwHvBrkFLEeIKMgjEtYLdFkDRdrxga4X0kdMF3oQVMLnqIMom/93jiJHerONLhg0yaCF XNtlFiwjUyv7fnI99m8damIi/IbgQsL/vQDm5Ie3BeSbYxuuFe6dqtBVHYIIe1j28MWQbtj/Y IhjYE2dpHBwbT+7UQrMHcWC+QAY5sOcyb7Ut+79gNZj/oGd0g8aSRgQhrMmkq82lpn/cqflj6 T4pGLW2xvWqPY13g4iT+wGc13jRrEBByFMxbrYzu5py8e4upVteZCSS8Gce0za22902XYxugv 84USIi2edoX7awNNKu0cclNnhzfh2m5Z+uZJZypoacEBGBUwtok4lfEyraLgYda+tmTQAV+sY tQ0o2D0+RjzSgXA7Gp+l95hlkpa5qqrFAoBXoPC2NOwJM9dW3oNTTZPAsXZNGMroyncYrJTkd 1UDiEUqCKfHeSpcwaqqH/d69KniF9YZ5ysAXBW5BvYFeLJpGIynLUdSSlHPZXOzaiD9uJqqIa 1X0YY+ccsAHvnmu598FFgx8EfFMVR7gNPx8ophw3U4/9KQsE1APwPYXpjGl+YY0JK1t16f9Tp 4gHyn2moCxF3VL0ndz9x49xacjzsBVpCcNQkFz5zdW8kQaAUS4acfsdsexGZQtn2oBMWeSRH4 oyw5KrFtL8qIAHUZO1kTyG3zkC8EkbMjkQxnrgGYj0wU2K5vxVexWWneEuu/eZ0aNC+UP455W Ex7cDzgduCb2fFlYboQQWARC5UZzI6YMLh25nSUGbGv7FXxVZ8eIDTlbABuQ= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, 01 Nov 2019 22:20:42 +0200 Eli Zaretskii wrote: >> From: Stefan Kangas >> Date: Fri, 01 Nov 2019 20:57:30 +0100 >> Cc: 11339@debbugs.gnu.org >>=20 >> > 0. emacs -Q >> > 1. M-x customize-option RET read-buffer-completion-ignore-case RET. >> > Toggle to "on", set for the current session. >> > M-x customize-option RET read-file-name-completion-ignore-case RET. >> > Toggle to "on", set for the current session. >> > 2. C-x C-f b TAB =3D> *Completions* buffer contains, as expected: bla = b=C3=84h >> > b=C3=A4h. >> > 3. Visit files `bla', `b=C3=A4h' and `b=C3=84h', switch to buffer *scr= atch* and >> > repeat step 2, replacing `C-x C-f' with `C-x b' =3D> same results. >> > 4. C-x C-f b=C3=A4 TAB =3D> Emacs completes the input to "b=C3=A4h".= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> > 5. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> > 6. C-x C-f b=C3=84 TAB =3D> Emacs completes the input to "b=C3=84h". >> > 7. TAB =3D> Emacs incorrectly reports: "[Sole completion]".=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20 >> > 8. Switch to buffer *scratch* and repeat step 4-7, replacing `C-x C-f' >> > with `C-x b' =3D> same results. >>=20 >> I can reproduce this on current master using the simpler recipe: >>=20 >> 0. emacs -Q >> 1. Evaluate (setq read-buffer-completion-ignore-case t) >> 2. C-x b b=C3=A4h RET >> 3. C-x b b=C3=84h RET >> 4. C-x b b=C3=A4 TAB TAB >>=20 >> Result: Completes to "b=C3=A4h" on first TAB, and on second TAB [Sole >> completion] is displayed in minibuffer. >>=20 >> Expected result: The "*Completion*" buffer is displayed. > > I think your expectations are incorrect in this case. Try having > buffer names that differ (not in letter-case) in the 3rd letter. > > What I see here is entirely expected and reasonable. I see no bug. I think the expectation I had about the variables read-{buffer,file-name}-completion-ignore-case was that they allow getting information with less effort, in that by typing either a lower or an upper case character, you would see names that have either or both cases. And that is apparently what I (thought I) had experienced with ASCII characters but not with non-ASCII characters, which I assume is what prompted my OP. Unfortunately, the recipe in my OP did not include the `bah' and `bAh' cases as a sanity check, and now I find the same behavior with them as reported above for the non-ASCII cases. So it seems either the handling of the ASCII cases has changed since my OP, or I was mistaken at the time in thinking there was a difference. I also followed up my OP more than a year later, reporting that the bug still existed and adding a further observation (https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-07/msg00340.html). And regarding the latter, on recent master that does indeed show a difference between ASCII and non-ASCII characters: 0. touch /tmp/{bah,bAG,b=C3=A4h,b=C3=84g} 1. emacs-master -Q --eval '(setq read-buffer-completion-ignore-case t read-= file-name-completion-ignore-case t)' /tmp/{bah,bAg,b=C3=A4h,b=C3=84g} 2. C-x b *scratch* 3a. C-x b ba TAB =3D> *Completions* pops up showing `bAg' and `bah' 3b. C-x b bA TAB =3D> *Completions* pops up showing `bAg' and `bah' 4a. C-g C-x b b=C3=A4 TAB =3D> *Completions* pops up showing `b=C3=84g' and `b=C3=A4h' 4b. C-g C-x b b=C3=84 TAB =3D> *Completions* pops up showing `b=C3=84g' and `b=C3=A4h' 5a. C-g C-x C-f /tmp/ba TAB =3D> *Completions* pops up showing `bAg' and `bah' 5b. C-g C-x C-f /tmp/bA TAB =3D> *Completions* pops up showing `bAg' and `bah' 6a. C-g C-x C-f /tmp/b=C3=A4 TAB =3D> completes to /tmp/b=C3=A4h 6a. C-g C-x C-f /tmp/b=C3=84 TAB =3D> completes to /tmp/b=C3=84g Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 19:08:48 2019 Received: (at control) by debbugs.gnu.org; 1 Nov 2019 23:08:48 +0000 Received: from localhost ([127.0.0.1]:57483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQg2C-0005uk-1c for submit@debbugs.gnu.org; Fri, 01 Nov 2019 19:08:48 -0400 Received: from host.gofardesign.uk ([208.79.239.190]:56775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQg2A-0005uS-DY for control@debbugs.gnu.org; Fri, 01 Nov 2019 19:08:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Subject:From:To:Date:Sender:Reply-To:Message-ID:Cc:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+hzXvx81o+YRFv8vvBA+mqFl4HrH+UhRSpgWw9rShk8=; b=TFFLxCMxk3uAAkJfvCiA2Bew2A +jxVCJl2FKxg1NCuOZIJwBDRHYJHNdOjEQcszAApjY6ezOmSCrLr8BnzwDDGTDpAhuilGj+idD0JJ 3gMFvdsv2Cxuo2HCongIODdE+/03EPZ3mc++gSMfg1nQ/uYE1nfCTx2duqR6kHIpkoSk=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:40674 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iQg23-0002Ls-Uh for control@debbugs.gnu.org; Fri, 01 Nov 2019 18:08:40 -0500 Date: Sat, 02 Nov 2019 00:08:38 +0100 To: control@debbugs.gnu.org From: Stefan Kangas Subject: control message for bug #10211 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" Message-Id: X-Spam-Score: -1.0 (-) merge 10211 11339 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 03:11:57 2019 Received: (at 11339) by debbugs.gnu.org; 2 Nov 2019 07:11:57 +0000 Received: from localhost ([127.0.0.1]:58010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQnZk-0008I9-Le for submit@debbugs.gnu.org; Sat, 02 Nov 2019 03:11:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQnZj-0008Hp-Gh for 11339@debbugs.gnu.org; Sat, 02 Nov 2019 03:11:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQnZd-0000st-Vp; Sat, 02 Nov 2019 03:11:50 -0400 Received: from [176.228.60.248] (port=4104 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQnZd-00066B-Dn; Sat, 02 Nov 2019 03:11:49 -0400 Date: Sat, 02 Nov 2019 09:11:54 +0200 Message-Id: <83tv7mkb0l.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87o8xvz0hp.fsf@gmx.net> (message from Stephen Berman on Fri, 01 Nov 2019 23:37:54 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> <83bltvl55x.fsf@gnu.org> <87o8xvz0hp.fsf@gmx.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: Stefan Kangas , 11339@debbugs.gnu.org > Date: Fri, 01 Nov 2019 23:37:54 +0100 > > I think the expectation I had about the variables > read-{buffer,file-name}-completion-ignore-case was that they allow > getting information with less effort, in that by typing either a lower > or an upper case character, you would see names that have either or both > cases. And that is apparently what I (thought I) had experienced with > ASCII characters but not with non-ASCII characters, which I assume is > what prompted my OP. Unfortunately, the recipe in my OP did not include > the `bah' and `bAh' cases as a sanity check, and now I find the same > behavior with them as reported above for the non-ASCII cases. So it > seems either the handling of the ASCII cases has changed since my OP, or > I was mistaken at the time in thinking there was a difference. I also > followed up my OP more than a year later, reporting that the bug still > existed and adding a further observation > (https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-07/msg00340.html). > And regarding the latter, on recent master that does indeed show a > difference between ASCII and non-ASCII characters: > > 0. touch /tmp/{bah,bAG,bäh,bÄg} > 1. emacs-master -Q --eval '(setq read-buffer-completion-ignore-case t read-file-name-completion-ignore-case t)' /tmp/{bah,bAg,bäh,bÄg} > 2. C-x b *scratch* > 3a. C-x b ba TAB > => *Completions* pops up showing `bAg' and `bah' > 3b. C-x b bA TAB > => *Completions* pops up showing `bAg' and `bah' > 4a. C-g C-x b bä TAB > => *Completions* pops up showing `bÄg' and `bäh' > 4b. C-g C-x b bÄ TAB > => *Completions* pops up showing `bÄg' and `bäh' > 5a. C-g C-x C-f /tmp/ba TAB > => *Completions* pops up showing `bAg' and `bah' > 5b. C-g C-x C-f /tmp/bA TAB > => *Completions* pops up showing `bAg' and `bah' > 6a. C-g C-x C-f /tmp/bä TAB > => completes to /tmp/bäh > 6a. C-g C-x C-f /tmp/bÄ TAB > => completes to /tmp/bÄg I'm confused wrt what you are saying here. Your original report seemed to be about read-buffer-completion-ignore-case not working as expected with non-ASCII buffer names. Are you now saying that the problem is actually with read-file-name-completion-ignore-case instead? Or are you saying something else? (May I suggest in the future to state explicitly the conclusion(s) from the evidence you present, so as to make the communications more efficient? TIA) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 11:16:16 2019 Received: (at 11339) by debbugs.gnu.org; 2 Nov 2019 15:16:16 +0000 Received: from localhost ([127.0.0.1]:32868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQv8Q-0001Y4-O7 for submit@debbugs.gnu.org; Sat, 02 Nov 2019 11:16:16 -0400 Received: from mout.gmx.net ([212.227.17.20]:33961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQv8L-0001PO-QU for 11339@debbugs.gnu.org; Sat, 02 Nov 2019 11:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572707760; bh=DiTvcikd+Nsqsvol7ulF9r8xOwG79v68DPl4EGLYsxk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Al/cxztO6GezAsh+TuptEZ5g7XeWVi8wakhygNaPOSzBzffdEV+Wwv0CQvTxcWNEO VBllcX8ORCX4fGkSYTPMBlgjBwjX1meSPY+OCCcr9blOuWmeFyAsdKNeuR6c7hFdtV AgretAqVcnDOtuTKSAFK/0Pa/axVtERi/k5Bz+eI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([178.6.96.234]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N0oBx-1i3SOT2HZd-00wqRb; Sat, 02 Nov 2019 16:09:36 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii References: <87ehrbyg8t.fsf@escher.home> <87lfszxtcl.fsf@marxist.se> <83bltvl55x.fsf@gnu.org> <87o8xvz0hp.fsf@gmx.net> <83tv7mkb0l.fsf@gnu.org> Date: Sat, 02 Nov 2019 16:09:31 +0100 In-Reply-To: <83tv7mkb0l.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Nov 2019 09:11:54 +0200") Message-ID: <87d0ea9uxg.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:+RiZshVibtQwSyO2YhE/3MeSfZwEtwZi3zsCNdSIZM9sIyE3qAh 6ewWF9E22Ru2uWXHCsDweYPictvNtFSO838SEwr9+x3tcpxaCaDTyi5dLTXOLLLPzBV1wqe ahgGLBFzUUp7KuXWiUFku0lVhlhujRykRt3GexarCwp/IWInolUpLtw/+NGAQIT5TbJEqFU LC86SEjvZoloxYIIo34rg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xQpoIIVku+E=:ecVuRrfftzUhMoeiH0fmYg nhFJGI6F1sz//Ez5rMP2qBVM50pm+D9wbr6xN1PPiN5E3aV/H380q9eEtX3lQiaBje7QWIN12 tW7H4rPpJJ57r8zGVLxIqCMVsF4ZO+Y5Wy3XgbDLnOI5DH2tzFSOVm3JNdmLJses+CW+6VnmM jXYouokBLvpcs+QLyZJZwSNf1d2Ln6yNHgTWKIjtHFzAzBiJVY1+D9glUhLml7mMhKFVN76m/ rTHaceHn9geOeow5qS3SbH5qus1nmRqCN8mmWOnrbIAmn952ytcQYZzzQRxkNwNjQ8W6mZVRM wQt7ZRUyowVl1QYzYZCYyiFk+THKTBXozO5fsKuH3vZ6CjE5U+jZ9MuVxFZ2WXSwKWtEUxWbr GYQtK9vSUdOqoT25n5DtMJlvi+gaiphcCg/jG2cDxMTY1LEkIy3Ga/hkh6JjtgUNoeBgkWgpd 1vv3An+bv/hxVGqvlaGLZUfWwo6GRgWs73cr31VV3P40gBRvgyEPv+g49RycZSdrVx46rI/ZY ugzccA/K15uQf5MfO5dmka4bHV4medDzUSEBQ3Bu1PRIzDhG8+hmhGlxEIzPgu1ZQyWgFb9nB zLEO3HMumVySPLSLeTvJ/5ybsgVNyPkghcbxOM2s33n6FnFw18Pkz6TlggEQDUIRd29iES22N Jkzz/aJy2i7dB59YF6gCGmyX1QpS+G22d1A41tE9JY80m1+VKvyWSatU7/5CAt40qmbrQ8lyq tlpW0SEGsBNWO9W4IcTN4Q3sUYWGwcqnfN9h3aaZcxqcGRzVmtzdybQptRv56t2tmAQVybop7 bTXdwd3wS+Xc8R9dLXPeNsD9I0CcUxgoP2rHpn7TsQqN7M+CV6ik/WpcnfVGOnzd+P0HFXaGC +u398KGMv7AN0U8Vr0vyutIIsv5VNX1oQ49vsfqTQ3AASFoMGujHLFy48xR1lNsdJPD77triz tx5WnT85Ibojjq61sImtcUds2RfanxbSPkAnSg9p869nm1TXvOHnDW9bM3oNxIBozCb4/JO4N JfC7CyLDQUo/Xh+8kw0VGEamgeuEnlt4bnaVfsnxWpgaznR02KPA5yyLgur8ITRCFL/18K95y Cjp/giaUfjlR6n1OZ3e8IvQPv768unZFZigGzNeX181iWNu3ry9KoaKwS7Yfi+wCbsJfPgu7s K4VztrfJWeDs85sHXW+i4DIbkwTgzwFGoDMbvJu0RgcNUQfPhhe0jQ6cCWG2gGs4tabIjPbs5 wXw6CtDOAZuE0vrRZHpU2V7FZxkBahWjJZW0kRlK4gkyscK5oJriiAzXeq00= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, 02 Nov 2019 09:11:54 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: Stefan Kangas , 11339@debbugs.gnu.org >> Date: Fri, 01 Nov 2019 23:37:54 +0100 >>=20 >> I think the expectation I had about the variables >> read-{buffer,file-name}-completion-ignore-case was that they allow >> getting information with less effort, in that by typing either a lower >> or an upper case character, you would see names that have either or both >> cases. And that is apparently what I (thought I) had experienced with >> ASCII characters but not with non-ASCII characters, which I assume is >> what prompted my OP. Unfortunately, the recipe in my OP did not include >> the `bah' and `bAh' cases as a sanity check, and now I find the same >> behavior with them as reported above for the non-ASCII cases. So it >> seems either the handling of the ASCII cases has changed since my OP, or >> I was mistaken at the time in thinking there was a difference. I also >> followed up my OP more than a year later, reporting that the bug still >> existed and adding a further observation >> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-07/msg00340.html). >> And regarding the latter, on recent master that does indeed show a >> difference between ASCII and non-ASCII characters: >>=20 >> 0. touch /tmp/{bah,bAG,b=C3=A4h,b=C3=84g} >> 1. emacs-master -Q --eval '(setq read-buffer-completion-ignore-case t re= ad-file-name-completion-ignore-case t)' /tmp/{bah,bAg,b=C3=A4h,b=C3=84g} >> 2. C-x b *scratch* >> 3a. C-x b ba TAB >> =3D> *Completions* pops up showing `bAg' and `bah' >> 3b. C-x b bA TAB >> =3D> *Completions* pops up showing `bAg' and `bah' >> 4a. C-g C-x b b=C3=A4 TAB >> =3D> *Completions* pops up showing `b=C3=84g' and `b=C3=A4h' >> 4b. C-g C-x b b=C3=84 TAB >> =3D> *Completions* pops up showing `b=C3=84g' and `b=C3=A4h' >> 5a. C-g C-x C-f /tmp/ba TAB >> =3D> *Completions* pops up showing `bAg' and `bah' >> 5b. C-g C-x C-f /tmp/bA TAB >> =3D> *Completions* pops up showing `bAg' and `bah' >> 6a. C-g C-x C-f /tmp/b=C3=A4 TAB >> =3D> completes to /tmp/b=C3=A4h >> 6a. C-g C-x C-f /tmp/b=C3=84 TAB >> =3D> completes to /tmp/b=C3=84g > > I'm confused wrt what you are saying here. Your original report > seemed to be about read-buffer-completion-ignore-case not working as > expected with non-ASCII buffer names. Are you now saying that the > problem is actually with read-file-name-completion-ignore-case > instead? Or are you saying something else? There are two issues: what was reported in my OP, and what was in my followup more than a year later. Concerning my OP, I reported what I took to be a bug in how completion works on names containing non-ASCII characters when either read-buffer-completion-ignore-case or read-file-name-completion-ignore-case (or both) are non-nil. My expectation was that with e.g. the names `b=C3=A4h' and `b=C3=84h' typing e= ither `b=C3=A4' or `b=C3=84' and then TAB should shows both names (for both buffe= r and file name completion), but in both cases TAB only completed to `b=C3=A4h' a= nd `b=C3=84h', respectively. Since the OP explicitly says this is a problem with non-ASCII characters, I assume I thought that with ASCII-only characters the behavior was different, i.e., with names `bah' and `bAh', typing either `ba' or `bA' followed by TAB did show both names as completions. However, what I now see is that only the respective completions `bah' and `bAh' are shown after TAB. I usually try to test what I consider to be all relevant cases before making a bug report, and if I did so in this case, that means completion with ASCII-only characters has changed since my OP, and if so, this seems to me to be a regression, since I had regarded similar behavior with non-ASCII characters as bug; but since I failed to include the ASCII-only cases in the bug report, perhaps I was mistaken and the ASCII-only cases were always like they are now. In any case, though the current behavior is consistent between ASCII-only and non-ASCII characters (unlike what I thought was the case when I made my OP), so I suppose it may be considered not to be a bug, it is not what I would prefer. 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. > (May I suggest in the future to state explicitly the conclusion(s) > from the evidence you present, so as to make the communications more > efficient? TIA) I'll try to, and I hope the above is now clear enough. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 11:16:01 2019 Received: (at 11339) by debbugs.gnu.org; 3 Nov 2019 16:16:02 +0000 Received: from localhost ([127.0.0.1]:34887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRIXp-0007Om-Du for submit@debbugs.gnu.org; Sun, 03 Nov 2019 11:16:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRIXn-0007OL-E9 for 11339@debbugs.gnu.org; Sun, 03 Nov 2019 11:15:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRIXh-0008HN-Vb; Sun, 03 Nov 2019 11:15:54 -0500 Received: from [176.228.60.248] (port=2386 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iRIXh-0001wl-2w; Sun, 03 Nov 2019 11:15:53 -0500 Date: Sun, 03 Nov 2019 18:16:01 +0200 Message-Id: <83eeyphr5q.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87d0ea9uxg.fsf@gmx.net> (message from Stephen Berman on Sat, 02 Nov 2019 16:09:31 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: stefan@marxist.se, 11339@debbugs.gnu.org > Date: Sat, 02 Nov 2019 16:09:31 +0100 > > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 08:39:43 2019 Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 13:39:43 +0000 Received: from localhost ([127.0.0.1]:36023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRca6-0004zo-VB for submit@debbugs.gnu.org; Mon, 04 Nov 2019 08:39:43 -0500 Received: from mout.gmx.net ([212.227.15.19]:42245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRca5-0004za-7J for 11339@debbugs.gnu.org; Mon, 04 Nov 2019 08:39:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572874771; bh=AiMNbhvNldN1GxJxjKaQ0C2VzQOY2Gcn6JfGa62K/8M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Io4nfaDD7iipd/uLugBqc4f5q3dT9d0CrRbqWm6fTbyGq0m6p7wQ5tU5lkJ9YU5Kl c1jrYRRsaswS3jQ2C3unk+7uZNoupv2d1rj9PMfrcGoOPsO+H+iUoZ9i4DSG8bEObz lT0bU11QgN5CHoxbDkc4fAACItDlJVhZ+23yiOgU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([188.109.197.143]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MS3ir-1iLs6r2hqt-00TQm2; Mon, 04 Nov 2019 14:39:30 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> Date: Mon, 04 Nov 2019 14:39:25 +0100 In-Reply-To: <83eeyphr5q.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Nov 2019 18:16:01 +0200") Message-ID: <87lfsvyd4i.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:4Wi/Q7pL+JN6uzkRJJ81MxkRb44bY07IDdcr+MKMwgtY6WulRqX O8P8uWLVQn86Exc9xTwCN6G3N9AbVwOaMrmTFYayQPlGKpPAu0yfrCprbQmYtGqu+8m7DvX ktzNHpwZkUBGEJqBJHf8jRAW+NE7quKeO2IgJ3NxyDfJBEbsMClTbFQfBke24hQwpDvbj38 gigPoZMZmIANnpAj+S47w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Rx7DDqzmtIM=:mAesZci1lJG7OjHAzktSxR wURxACc+axzgGG9m9MSFp4SyqKtzI5x61kBSp3S0ry5gruFP8KAmv3abJfYH4cfuft+0LeULY YrPuFjAUK4B2R6ssm/ES4vD5pSMmSxHhHUeBNvRPQdwBW7CVT2xs7EfRcIGwaCcvER5vlGae2 Lei6gh292tivDylC1wlqDJaICA19Vy0WT4AI/ZE8XW2waKnnnRnYTYw/DgKkpQZbxf8wioBaD YHHKcaERv77RULVPuG6WnmcyJcc6on8GjOnaj0QrigGXqqnIgOE4GJaayUC5fXqQcA0Yti09T opZQn6l8BRtnbulZ6lOhxM4/TikNGjP+CFmCGZBh+ztFAIcjdToJi5vtxc6UABvdXANmz8tmU 83Yh9yjQWzCKf4Uh0Q+tQHVvW1bjkZla8db4G8WZy4gdN1iIcUKyWPvTZSL2hJ62NAmIYTYEX H4NAP+pEvD9bGCcSEDd6gkKp/0iVLzEtRT3eNNPayocUZf/A9BM0v3VjP5GVrdTd0XoZnswlZ 02WkS6VSnUwbDgUl4FWtk8n1lLAe75bctloVj+WpHwZpxJAatseWBXV02h0yYrIHk3D40ejdW 0Tq1EHwT7UzPqbvAt/xhw290dCPKR7N7t0uJ9JPyXKa4fXJ8IOr+YkIhVpt6iCoLqgYqRoTX8 zmAOaRbDS6Q1TW4aPVcLaOmwZemAsUHTiTjeFjCoVTfz4ev5iB7YFwEb88/P+uVdcuET+HvVV lGjYo8hrHELWu0VDK4u5lNcSGqbm7Wb5ljOizi60PojuxuocQFoQwHQtL9rojqGxgOAlyjBcY qAsYY7kIOzz1o7H6KbvCIIXlwQBRn3APdeJ+WEvuUwuSNaauZZbVVChZYrMsLi044+JZE52vJ Gh89jozYKoU3lqrOO0xr3vdzTOmCv/AuyBZYCJLz5p9mRdD9E1xSXAG2+YV93+gfGTt+0Tfpx f79sC4FR5zth13n40k5/eE1YKvEsyzBGfC6ncrEnbMC2UU4ljX8u1lxhkRVtniXETGh0v6DCL igUDYC4yxqg+nKsqcgdJ+BlumpV7l/G1jsQL9FHrK9OasVXo75iEE5lgLsMEnlawUVhPrnpup D8xro9B/twN4lBXh5NLEd6laN+ktIKafpJ3HiMlNnkzDcnyKIAw+vQIIGJFDxhk+xrrfI1cjg 1jpL4bm6jFhF4JUlbMICuW7uWZ2SpGzW5ikGYCNF+zZ3/rDxHib3YA6+74r1TcZ8uQBcBnJhJ drNlfn/U+h2k+3knfh4I6NTwHyL+CCrqkELZmlPmY8d6JA5luD1nU1K/6uuI= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 >> >> Concerning my followup to my OP, that involved another difference I >> observed in completion behavior between buffer names and file names wit= h >> 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 character= s >> (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 th= e >> 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. However, there seems to be some unintended fallout: 0. emacs -Q 1. M-: (setq read-buffer-completion-ignore-case t read-file-name-completio= n-ignore-case t) 2. M-x cd RET RET =3D> args-out-of-range error (backtrace attached) This only seems to happen when trying to cd to a non-empty directory. Judging by the backtrace, it also seems to be the same as bug#38056, except that I cannot reproduce the error initially using the recipe of that bug, but only with the one I gave above. But once the error occurs, all subsequent uses of TAB or RET for completion appear to raise the error. Steve Berman --=-=-= Content-Type: text/plain Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: backtrace Debugger entered--Lisp error: (args-out-of-range ".mupdf.history" 12 2) file-name-completion("" "~/" #f(compiled-function (dir) #)) completion-file-name-table("~/" #f(compiled-function (dir) #) nil) try-completion("~/" completion-file-name-table #f(compiled-function (dir)= #)) completion--file-name-table("~/" #f(compiled-function (dir) #) nil) complete-with-action(nil completion--file-name-table "~/" #f(compiled-fun= ction (dir) #)) #f(compiled-function (table) #)(completion--file-name-= table) completion--some(#f(compiled-function (table) #) (comp= letion--embedded-envvar-table completion--file-name-table)) read-file-name-internal("~/" #f(compiled-function (dir) #) nil) locate-file-completion-table(("./") nil "~/" #f(compiled-function (dir) #= ) nil) apply(locate-file-completion-table (("./") nil "~/" #f(compiled-function = (dir) #) nil)) #f(compiled-function (&rest args2) #)("~/" #f(compiled= -function (dir) #) nil) try-completion("~/" #f(compiled-function (&rest args2) #) #f(compiled-function (dir) #)) completion--complete-and-exit(27 29 exit-minibuffer #f(compiled-function = () #)) completion-complete-and-exit(27 29 exit-minibuffer) minibuffer-complete-and-exit() funcall-interactively(minibuffer-complete-and-exit) call-interactively(minibuffer-complete-and-exit nil nil) command-execute(minibuffer-complete-and-exit) read-from-minibuffer("Change default directory: " "~/" (keymap (keymap (3= 2)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-an= d-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "C= omplete" minibuffer-complete :help "Complete as far as possible") (space me= nu-item "Complete Word" minibuffer-complete-word :help "Complete at most on= e word") (63 menu-item "List Completions" minibuffer-completion-help :help = "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to= -completions)) (prior . switch-to-completions) (63 . minibuffer-completion-= help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (men= u-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous Histor= y Item" previous-history-element :help "Put previous minibuffer history ele= ment in the min...") (next menu-item "Next History Item" next-history-eleme= nt :help "Put next minibuffer history element in the minibuf...") (isearch-= backward menu-item "Isearch History Backward" isearch-backward :help "Incre= mentally search minibuffer history backward") (isearch-forward menu-item "I= search History Forward" isearch-forward :help "Incrementally search minibuf= fer history forward") (return menu-item "Enter" exit-minibuffer :key-sequen= ce "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit= " abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf"))= (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (= C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back= . previous-history-element) (up . previous-line-or-history-element) (prior= . previous-history-element) (XF86Forward . next-history-element) (down . n= ext-line-or-history-element) (next . next-history-element) (27 keymap (60 .= minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) = (115 . next-matching-history-element) (112 . previous-history-element) (110= . next-history-element))) nil file-name-history "~/" nil) completing-read-default("Change default directory: " read-file-name-inter= nal file-directory-p t "~/" file-name-history "~/" nil) completing-read("Change default directory: " read-file-name-internal file= -directory-p t "~/" file-name-history "~/") read-file-name-default("Change default directory: " "/home/steve/" "/home= /steve/" t nil file-directory-p) read-file-name("Change default directory: " "/home/steve/" "/home/steve/"= t nil file-directory-p) read-directory-name("Change default directory: " "/home/steve/" "/home/st= eve/" t) byte-code("\302\303C\211\304\305\306\307\310\6\7\6\7\"\311\"\312$\240\210= \304\305\313\307\310\5!\314\"\312$\216\315\316\2\242\"\210\10\2045\0\317\32= 0\321!!\2064\0..." [cd-path default-directory #f(compiled-function () #) nil make-byte-code 0 "\302\303\301\242\"\210\300 \20= 7" vconcat vector [remove-hook minibuffer-setup-hook] 3 "\301\302\300\242\"= \207" [remove-hook minibuffer-setup-hook] add-hook minibuffer-setup-hook pa= rse-colon-path getenv "CDPATH" "./" read-directory-name "Change default dir= ectory: " t] 10) call-interactively(cd record nil) command-execute(cd record) execute-extended-command(nil "cd" "cd") funcall-interactively(execute-extended-command nil "cd" "cd") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 11:21:28 2019 Received: (at 11339-done) by debbugs.gnu.org; 4 Nov 2019 16:21:28 +0000 Received: from localhost ([127.0.0.1]:37408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRf6e-0001Jx-8G for submit@debbugs.gnu.org; Mon, 04 Nov 2019 11:21:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRf6b-0001Ji-Ru for 11339-done@debbugs.gnu.org; Mon, 04 Nov 2019 11:21:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRf6W-000601-CI; Mon, 04 Nov 2019 11:21:20 -0500 Received: from [176.228.60.248] (port=3242 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iRf6V-0005ls-AW; Mon, 04 Nov 2019 11:21:19 -0500 Date: Mon, 04 Nov 2019 18:21:31 +0200 Message-Id: <83y2wvhat0.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87lfsvyd4i.fsf@gmx.net> (message from Stephen Berman on Mon, 04 Nov 2019 14:39:25 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339-done Cc: 11339-done@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: stefan@marxist.se, 11339@debbugs.gnu.org > Date: Mon, 04 Nov 2019 14:39:25 +0100 > > > I hope I fixed this now, please try the latest master. > > I've now updated and, the above bug is now fixed; thanks. Thanks, I'm closing this bug. > However, there seems to be some unintended fallout: > > 0. emacs -Q > 1. M-: (setq read-buffer-completion-ignore-case t read-file-name-completion-ignore-case t) > 2. M-x cd RET RET => args-out-of-range error (backtrace attached) This is bug#38056, which I just fixed. It was caused by a thinko on my part. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 11:22:50 2019 Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 16:22:50 +0000 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 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 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 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> Date: Mon, 04 Nov 2019 17:22:30 +0100 In-Reply-To: <87lfsvyd4i.fsf@gmx.net> (Stephen Berman's message of "Mon, 04 Nov 2019 14:39:25 +0100") Message-ID: <87h83jy5kp.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:3uOqCbXzEGpU7DySVj6XaYP9XkrWBBTjfFVWO7owDyQorV1ZodG 5tT0Mm/T/CbaVSqkfhfLlXziWbuXeXpjYG2Jf61n12F9+gbleZZwEyOf9i58+VUaeE1pyld P9391xktah3IUKhIAt8drLk6W8M+GxsZHu5+VPIaJtVqGvExoFvQHKyZLIeLceZ8qsjr+HO xwT3TNG7o1wkAIb9SRwFA== X-Spam-Flag: NO 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+JFIJJBqsBHuRq1Q X3gJteXKPpG2m0qTZ3NPOZvg5CFOduNSqEW6v60jgdtc2QkmMo+X1FkzxKjUhtKl/jZAumr5x pWG6sd2bXACGBw4aCqaLK2t+wKqDpjfOwAodF+l030HGyGvoMlssp4PbF1Up2CnAxeZTwRA9i 0vYoynLxa1159qQGWcL94AU3OtzVB41TjzYYOFk3kTVG0cGz22fKyqguEfiN1ojq7jwq13axT YJXxOzrQD6c86c9NEKVLP91kZA9qRrO4wm/Kp3h8dVShCWBHKqQKhHuG7CF/EteixyNlpAaYH N5XqNNZzmJHb5N1KTf2Xz11HLawHDeC7hAIxxT6v00d0j2MhsO3jiBCceESDoAnNuc77qZMvk 9VCW4JeYRBZM/BIEeamoAB/TRtSP3zc0i2RPR/YTJF52FF5RrSKCI+UZBLAs+7ezREqeeCSGH 5LBZQa0txQNU1VR6xbI0lf9G4M99+ANfa+U2jVNOhuibXhmr2fhszjB4Y7sU= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 12:12:01 2019 Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 17:12:01 +0000 Received: from localhost ([127.0.0.1]:37453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRftY-0002j9-KP for submit@debbugs.gnu.org; Mon, 04 Nov 2019 12:12:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRftX-0002it-CV for 11339@debbugs.gnu.org; Mon, 04 Nov 2019 12:11:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRftR-0000VV-0c; Mon, 04 Nov 2019 12:11:53 -0500 Received: from [176.228.60.248] (port=2340 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iRftQ-0004MN-Af; Mon, 04 Nov 2019 12:11:52 -0500 Date: Mon, 04 Nov 2019 19:12:03 +0200 Message-Id: <83v9rzh8gs.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87h83jy5kp.fsf@gmx.net> (message from Stephen Berman on Mon, 04 Nov 2019 17:22:30 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: stefan@marxist.se, 11339@debbugs.gnu.org > Date: Mon, 04 Nov 2019 17:22:30 +0100 > > After your fix: > > 1. $ emacs-master -Q --eval '(setq read-buffer-completion-ignore-case tread-file-name-completion-ignore-case t)' /tmp/{bah,bAh,bäh,bÄh} > (*Buffer List* show the buffers bah,bAh,bäh,bÄh) > 2. C-x b *scratch* > 3a. C-x b ba TAB > => completes to bah and after TAB displays [Sole completion] > 3b. C-g C-x b bA TAB > => completes to bAh and after TAB displays [Sole completion] > 4a. C-g C-x b bä TAB > => completes to bäh and after TAB displays [Sole completion] > 4b. C-g C-x b bÄ TAB > => completes to bÄh and after TAB displays [Sole completion] > 5a. C-g C-x C-f /tmp/ba TAB > => 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 > => 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ä TAB > => completes to /tmp/bäh 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Ä TAB > => completes to /tmp/bÄh and after TAB displays [Complete, but not 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. "You are in a maze of twisty little passages, all alike." (I'm confused by a dozen of similar examples which don't say which result is deemed to be correct and which isn't.) Previously, you said that buffer-name completion works correctly, so I never looked at that (which explains why there's no change in that behavior before and after my changes). The changes I made are in code that is used only for completing file names, which again explains why completion of buffer names didn't change. Now you are saying that buffer-name completion works incorrectly? Or are you saying something else? I'd like to be sure what is it that you consider in the need of fixing, and why. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 04 13:02:32 2019 Received: (at 11339) by debbugs.gnu.org; 4 Nov 2019 18:02:32 +0000 Received: from localhost ([127.0.0.1]:37492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRggR-00045f-Od for submit@debbugs.gnu.org; Mon, 04 Nov 2019 13:02:32 -0500 Received: from mout.gmx.net ([212.227.15.15]:35771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iRggP-00045P-SY for 11339@debbugs.gnu.org; Mon, 04 Nov 2019 13:02:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572890539; bh=fzbMrK+yQDjoB+fizkQdzPJ1bQDXlNUle8EqccVe+/Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ihVi4Qk5ujTZV6NDFuKh13I2QgcAKFoOj7ooRt1iyTsi17HXZxFft0JSz0+D73Zsr H9bvfQQLoO2sU09L+8oEB0vamKkUCq9z+09zVNAZJIzWhh45FkkQ5Bh5oFoN6uCYbe 8LOtHtV8zBNb1CHQlhbMWuzRalp+yZIGTSrrd6A4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([188.109.197.143]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6KYl-1hqciY0Ji5-016fLC; Mon, 04 Nov 2019 19:02:19 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> Date: Mon, 04 Nov 2019 19:02:15 +0100 In-Reply-To: <83v9rzh8gs.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 04 Nov 2019 19:12:03 +0200") Message-ID: <875zjzy0yg.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qF1s/syxi1MMaDV2Cg2C2bJLD4Osd2DkftPB4gRQKUCRaAK6zRw SSRTEohAJti1I+b1Bx04GOrlxf22c8WIqBoFjH5ljrtP+YyNNNQ2q7i1By0nprWJYDDpXWv XCYZZOzS9iVrigibyZmll7W+fC9okfyFTaO2cQIi7m0mgZMQF7NhzrfcwcHkZW+8CheUnRT 5AWF23GHTcwtGmMCqPAAg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uctbYhDvPsE=:yfEhydjPkN7Jpx0lWe270E FNvxxgXnRgYZq8OG+UJRYjMvbVdH9m3J/bjt0pzYbNc0/xfwfDnSO47O9mgfGwA0Sx8yG++gU DvBCzRVwwZK7AmuskrBo5lS1Qdlk6pNVuz9dY1ie3DM4PsxiWpb7s3yN+eE0f9BMX4mXHA4O6 S17wDMLNT+6698tzEa+yxznw2v9ZQveqUb0hx1b8ZkweIzVkNcKEw3M/O+IRb8Q6d+3XOaeUg lm0zu/l1oZte9cpW6JC+krmIjsvG83TlV2IcOipiU3tPNFSiSgufNGXhJ2HlZ0eg7N88KnPp1 Rg643pSrCPhy2TtPIsyVUg6XCSxGVj+gBzttpEv0ytY8xHnTMl3LMt0IyE9jk/2mSvt7AUcqf 7PDC7XeoKhie4OCRoNQCYRTg0qx74U65ptwrcmxH6v1Y3ACTbqo3GA3HxhBDG/viaWYVTm4EO roCKyC99s8m1lmXH5cZCU303kz3kPvjKU0QJLdWxNLASqRKw+GKnWwalIFh0/ZDSCbre/UQjh Klcq4ED1cykV6+l8b/w/gHlwgy35COby1WciplajpdtMGWXwKdJ0LW/BPEc98DkiRpbOht3Vc PTbYQTUEN5CWffxheeaUmk1TntkuJwSDghVptFcXqBOcfyyO/PRYeylrir+6qeIW5POx26/6f Nd5R5Ws4RSrp6Kz/RKX78WFVB1NsFFRDdHP7zjnl4d+gXKHnWAeWrl4TsGxEDTBSt5XWzcoUq rZ7k14KAh4rsGlfCeEbSam8DZgkvJ+PFLlSJU9q5dqHmI2aUpJFDOszK/Vu0iEW04rrKmq4P3 x0p8fV+RBNQxV/0P085ptxagk+BSjHAX01Nr13BH9MJORpCe1OjhMWwf6q+I9sq+u/zQ/eelC mvGE6ALpYA3DDJ2uFYtiw6xKwubFZa5g2MnPK6Ohv4cv9O8VwmM+jXuQtybeY0Ara5dTQeTjS LQGHPVBeCE+Zwewz2c+61dSNgwc98NteMrMZzvWvSYZ730q6lPSE27Mo2WI0niQm5RIpXiGUH 92tf0IOUY45/GQxqtvmE2I3+hfj4KyIGl5qcn486xuFQdg7xf1Cwo5DFMIyKp2FSF2P7j44xY V45GR3/gGDHEUeXP0xoP23hl9qnMCpvK18flkJF23KF8oQu3T9yUIy4Dji7FMhwO1lelb+ZVi 1PkVhVS9sQs1gEeat11B7wSWv8+lEbp6xQJF3P/w1ej+DnZaSFUNI8eftyQ7oJQtN/JkuKbrD 5HiwZV2rxfMsyvCkZv+ulAEI5J8o4477y8AYU+NQcnDsG9ZsZ/aWr8qawVPg= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mon, 04 Nov 2019 19:12:03 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: stefan@marxist.se, 11339@debbugs.gnu.org >> Date: Mon, 04 Nov 2019 17:22:30 +0100 >>=20 >> After your fix: >>=20 >> 1. $ emacs-master -Q --eval '(setq read-buffer-completion-ignore-case t= read-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 uniqu= e] >> 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 uniqu= e] >> 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= not 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= not unique] >> and *Completions* pops up showing `bAh' and `bah' >>=20 >> 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. > > "You are in a maze of twisty little passages, all alike." > > (I'm confused by a dozen of similar examples which don't say which > result is deemed to be correct and which isn't.) > > Previously, you said that buffer-name completion works correctly,=20 I don't think so. In my OP of this bug I reported the results of `C-x b' as incorrect (step 8 of the recipe there). In my followup a year later, I reiterated that the "bug still exists" but added a different observation of correct behavior involving `C-x b' but incorrect behavior involving `C-x C-f'. After Stefan Kangas's post revisiting this bug, which only looked at the `C-x b' behavior of my OP, you implied the behavior is correct and said you see no bug, to which I replied with what I intended to be a clarification of my OP, but it seems to have confused you; my followup to that unfortunately seems to have added to the confusion concerning the behavior of `C-x b', for which I apologize. But I hope and think my last reply quoted above is clear: "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." To phrase it in terms of correctness: the results of `C-x b' in steps 3-4 quoted above are incorrect; they should be the same as the results of `C-x C-f' in steps 5-6, which are correct (IMO). Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 06 11:59:02 2019 Received: (at 11339) by debbugs.gnu.org; 6 Nov 2019 16:59:02 +0000 Received: from localhost ([127.0.0.1]:41181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOe5-0003Vw-M4 for submit@debbugs.gnu.org; Wed, 06 Nov 2019 11:59:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSOe3-0003VZ-7j for 11339@debbugs.gnu.org; Wed, 06 Nov 2019 11:58:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSOdx-0007vF-Jd; Wed, 06 Nov 2019 11:58:53 -0500 Received: from [176.228.60.248] (port=2494 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSOdw-0000Qy-Db; Wed, 06 Nov 2019 11:58:53 -0500 Date: Wed, 06 Nov 2019 18:58:36 +0200 Message-Id: <831rulgcw3.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman , Stefan Monnier In-reply-to: <875zjzy0yg.fsf@gmx.net> (message from Stephen Berman on Mon, 04 Nov 2019 19:02:15 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: stefan@marxist.se, 11339@debbugs.gnu.org > Date: Mon, 04 Nov 2019 19:02:15 +0100 > > >> 1. $ emacs-master -Q --eval '(setq read-buffer-completion-ignore-case tread-file-name-completion-ignore-case t)' /tmp/{bah,bAh,bäh,bÄh} > >> (*Buffer List* show the buffers bah,bAh,bäh,bÄh) > >> 2. C-x b *scratch* > >> 3a. C-x b ba TAB > >> => completes to bah and after TAB displays [Sole completion] > >> 3b. C-g C-x b bA TAB > >> => completes to bAh and after TAB displays [Sole completion] > >> 4a. C-g C-x b bä TAB > >> => completes to bäh and after TAB displays [Sole completion] > >> 4b. C-g C-x b bÄ TAB > >> => completes to bÄh and after TAB displays [Sole completion] > >> 5a. C-g C-x C-f /tmp/ba TAB > >> => 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 > >> => 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ä TAB > >> => completes to /tmp/bäh 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Ä TAB > >> => completes to /tmp/bÄh and after TAB displays [Complete, but not 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. > > > > "You are in a maze of twisty little passages, all alike." > > > > (I'm confused by a dozen of similar examples which don't say which > > result is deemed to be correct and which isn't.) > > > > Previously, you said that buffer-name completion works correctly, > > I don't think so. In my OP of this bug I reported the results of `C-x > b' as incorrect (step 8 of the recipe there). In my followup a year > later, I reiterated that the "bug still exists" but added a different > observation of correct behavior involving `C-x b' but incorrect behavior > involving `C-x C-f'. After Stefan Kangas's post revisiting this bug, > which only looked at the `C-x b' behavior of my OP, you implied the > behavior is correct and said you see no bug, to which I replied with > what I intended to be a clarification of my OP, but it seems to have > confused you; my followup to that unfortunately seems to have added to > the confusion concerning the behavior of `C-x b', for which I apologize. > But I hope and think my last reply quoted above is clear: "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." To phrase it in > terms of correctness: the results of `C-x b' in steps 3-4 quoted above > are incorrect; they should be the same as the results of `C-x C-f' in > steps 5-6, which are correct (IMO). I'm sorry, but someone else will have to dig into this. I tried, but got lost. I always do when I try to debug non-trivial issues with completion, what with the endless ping-pong of calls from minibuffer.el to minibuf.c and back, both directly and indirectly via variables whose values are functions. The best I could see (unless I'm mistaken) is that in the "C-x b" case the second TAB sees that the string in the minibuffer is a possible completion, and declares success; it doesn't call all-completions as I'd expect. If this observation is correct, then relying on try-completions in this case is what trips us, because try-completions has special heuristics when the candidates are all identical but for the letter-case, the result being that only one candidate is returned. CC'ing Stefan who might have a better idea of what is going on here. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 09:34:40 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 14:34:40 +0000 Received: from localhost ([127.0.0.1]:41864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSirw-0002vQ-Bb for submit@debbugs.gnu.org; Thu, 07 Nov 2019 09:34:40 -0500 Received: from mout.gmx.net ([212.227.17.20]:33983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSirs-0002v9-EP for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 09:34:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573137259; bh=+1fVZVLTB5YG3JvAbkc1fvr129Wvu8rJcl1a8D37EU8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=VNRh9dZLK0aag1u/9FvgXnN7mbZSMQxF12Z5ASvGIHdKb/A00sOA/9HVX+dYj1anS fTZMsMdlSZvcvbFekbmtlnhkaapSSawQh6JT4oYaNz/NirG5eCgMsxqLtVFfr4vXvf 7Ww6rasFeKi94+BBzXzGHDzf4D2mGz1RHGIIx8XQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([88.74.20.3]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKsnF-1iCYtC1Vin-00LEc5; Thu, 07 Nov 2019 15:34:19 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> Date: Thu, 07 Nov 2019 15:34:15 +0100 In-Reply-To: <831rulgcw3.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 06 Nov 2019 18:58:36 +0200") Message-ID: <87wocb21so.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XpdCwGp477fv1rlpGGWMFisJKrmcLwlpug2pRWgY1t++xActDTW 8yxKc0vBPz1C2zArHavEXMASkAn6VI4CjMF8tQcPvIRPAUZfDRjsUI77zWIp6x6o1CM3y7L jpNQwGllCZUWLaZCuiVCEw8SwFVxcijJrSKPW0xaiU8hzHYXMLMcX+6xY9hewlgsPseYb+8 YpRkIG+h0uOOaTIioSBSg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:+kEwK1PnipI=:/YcdtjK8pvl/996g7O9+Qn L/bnzH7WT5a/z61bRpDQUB7tFaBEj7yEAkPjIbwcxNh7vmMCA5acN7seVUM/g9Cwl9/xCRBRD lGQlVW+z5PA1dbimcTS4vJSc51IXMvTKiNPPKdFPtBK8A4pv3z5lp97W1BPDVkTUajQVxy2oq NJ+avSjkmP2WD33ZnUc5VSwMMgR0IpICgq8PRwk8VQY8LDls9lbw+s/qE0xsoqFp0UwxaPnZ4 Z8c76nhXZtviTBxTXoVCYOVpw17RZniGsfWRAO6iUmohdsBWLDJYdYVJ6MYmJrHqYC1GOnQmh WmIXeH5MI0Ie6rf94XX21rmUkguS9/N6t4Q38fbO2WOJxeUaaAP6qCJtBjoXi9c6523zoX9ZS pkBtRrPoFNVg76XZk7Ev+hi+pyy0N9PTiijyjwfOHx6UL6t9R1gEI/3D6nQ0OUdN4Yeoy+SsJ 9KgK+hzJL4CHu/FZ/JFkXTylKpf+UyeQLzs+IIvq7okteeUOAQYK2jbVCdiYoqUZhUwQWpBq7 tPkImPqnG0sOqirFR7xvUvISWMPx6gvEZIq87UzRCe74ghhKDdL+oVHEoaWcDpLTYL7BbNxV+ rQTw4vMarH15JOXL7cLkM4iFybX6CaTkyVVNwj0TLMEhnMeEqVcA3LsMbrzt03CZGbYDQOa5U 4RW4ACmdL+daDStjolvrwtWofk7qJ/U6O25a22WoI0622gpyk8xARTtArgaJlClFC25Ag2cSv V3zJ/vVK03UDkj4E4+FxhyTVgoHmHR1JBmGYd1VN7m1/M0Gh5fHPIt2Rqy9QR5N/mjiPWvCEH iF13xrW4z1/wShca4EPRlm5jYzx6bpdQvgA76U9vq0GukfjZS+2+NuXyekbv06/lA/HNkQ6LB hzXZaE8jbkfoKuCkua0utEl5Wx7v/9ZoStWxG4rMk49s5SGu/8qH3cMG3b7enwn72xXNmfQSv JEPfflmJM941TIzp2TdIGFjd6d9jbA3vRmrseLsG7MN/wgqJcSSrXJa1qn8yb1Wyu6aOjIHEu 7LAW6ujDbJkkXmHlhY5YIqZPhvjW6l0OsoYIaqfI7fv9xKGAkL77vC0iIwF6BpUUcd0sNJa2f sSLbeVmn8zGPu392qqqzOKxbKyTL4CQ8q7GfzozS9dpjCVT4Xej6M2SFq1XFQX4KFWzaeBrTg XsmaiZPGWhBo6xiORwyal4/GUOB20gRc/VRu8AnM/+OfAY8hzdeMZUJmwU+NhNI4sWbr2IQ2P ZCJvnWj4//e+4kOC3dFDQkhcdeX/LqVf+YDivwnDQZOJ+hRkSnG5FjhuiNi8= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Wed, 06 Nov 2019 18:58:36 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: stefan@marxist.se, 11339@debbugs.gnu.org >> Date: Mon, 04 Nov 2019 19:02:15 +0100 >>=20 >> >> 1. $ emacs-master -Q --eval '(setq read-buffer-completion-ignore-cas= e tread-file-name-completion-ignore-case t)' /tmp/{bah,bAh,b=C3=A4h,b=C3=84= h} >> >> (*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 un= ique] >> >> 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 un= ique] >> >> 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 not 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 not unique] >> >> and *Completions* pops up showing `bAh' and `bah' >> >>=20 [...] >> the results of `C-x b' in steps 3-4 quoted above >> are incorrect; they should be the same as the results of `C-x C-f' in >> steps 5-6, which are correct (IMO). > > I'm sorry, but someone else will have to dig into this. I tried, but > got lost. I always do when I try to debug non-trivial issues with > completion, what with the endless ping-pong of calls from > minibuffer.el to minibuf.c and back, both directly and indirectly via > variables whose values are functions. > > The best I could see (unless I'm mistaken) is that in the "C-x b" case > the second TAB sees that the string in the minibuffer is a possible > completion, and declares success; it doesn't call all-completions as > I'd expect. If this observation is correct, then relying on > try-completions in this case is what trips us, because try-completions > has special heuristics when the candidates are all identical but for > the letter-case, the result being that only one candidate is returned. > > CC'ing Stefan who might have a better idea of what is going on here. So why do we have to rely on `try-completion' here? Emacs built with the patch below shows the behavior I want with `C-x b' using the above recipe. I assume that are bad side effects elsewhere, but I can't think of any offhand. Steve Berman diff --git a/src/minibuf.c b/src/minibuf.c index f6cf47f1f2..4faf2f856d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1777,9 +1777,7 @@ If FLAG is nil, invoke `try-completion'; if it is t, = invoke `all-completions'; otherwise invoke `test-completion'. */) (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag) { - if (NILP (flag)) - return Ftry_completion (string, Vbuffer_alist, predicate); - else if (EQ (flag, Qt)) + if (EQ (flag, Qt)) { Lisp_Object res =3D Fall_completions (string, Vbuffer_alist, predica= te, Qnil); if (SCHARS (string) > 0) From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 09:49:47 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 14:49:47 +0000 Received: from localhost ([127.0.0.1]:41873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSj6Z-0003Ij-59 for submit@debbugs.gnu.org; Thu, 07 Nov 2019 09:49:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSj6S-0003IR-92 for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 09:49:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSj6M-0001SB-Rr; Thu, 07 Nov 2019 09:49:34 -0500 Received: from [176.228.60.248] (port=3060 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSj6M-00021p-6S; Thu, 07 Nov 2019 09:49:34 -0500 Date: Thu, 07 Nov 2019 16:49:22 +0200 Message-Id: <831rujg2rx.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-reply-to: <87wocb21so.fsf@gmx.net> (message from Stephen Berman on Thu, 07 Nov 2019 15:34:15 +0100) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stephen Berman > Cc: Stefan Monnier , stefan@marxist.se, > 11339@debbugs.gnu.org > Date: Thu, 07 Nov 2019 15:34:15 +0100 > > > The best I could see (unless I'm mistaken) is that in the "C-x b" case > > the second TAB sees that the string in the minibuffer is a possible > > completion, and declares success; it doesn't call all-completions as > > I'd expect. If this observation is correct, then relying on > > try-completions in this case is what trips us, because try-completions > > has special heuristics when the candidates are all identical but for > > the letter-case, the result being that only one candidate is returned. > > > > CC'ing Stefan who might have a better idea of what is going on here. > > So why do we have to rely on `try-completion' here? Because that's how completion--do-completion was coded, I suppose. > Emacs built with the patch below shows the behavior I want with `C-x > b' using the above recipe. I assume that are bad side effects > elsewhere Of course. We cannot make such a change, I think. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 11:01:16 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 16:01:16 +0000 Received: from localhost ([127.0.0.1]:43745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkDh-0007f5-Eo for submit@debbugs.gnu.org; Thu, 07 Nov 2019 11:01:16 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkDe-0007en-VP for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 11:01:11 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 82C02449974; Thu, 7 Nov 2019 11:01:05 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4837C449962; Thu, 7 Nov 2019 11:01:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1573142464; bh=LBkd9YJj5NF8wYd4N19xllAgcMr33tEKc/O6pF1Fx+A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=izcO/e7zgR4nOCxOH0gEuIyTLinh6UKgNBUxwLhOKCPWqdZksoWmqY0IDzxkm9UnE pNhW6ShkaNNkIscugyGDupiMuaVgL+huO8RB4T0HSMN+bbkJNHZGzM6D5evlqdO1uf 94DGCuPDXO4C7gSS3UY52//Thqthxrc9DDHXk3299d+e/k+SNCjeWkCPSoynfhFgxv uAuqucRhS8rTyMX9wFa/1hK9mSA3TRl7eVGqekKJGV0rli7idby3AYRyjOF6Nez0iL CTezqc20PqsC9sRIyIOge8fuqWRT0FykpUufWQDP3wJz/qp199Vh2vn2Uv356RQODu z3GK7GLnMNUmA== Received: from pastel (unknown [216.154.47.134]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 134B112061D; Thu, 7 Nov 2019 11:01:04 -0500 (EST) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Message-ID: 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> Date: Thu, 07 Nov 2019 11:01:01 -0500 In-Reply-To: <87wocb21so.fsf@gmx.net> (Stephen Berman's message of "Thu, 07 Nov 2019 15:34:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/x-markdown; charset=UTF-8 X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.113 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: Eli Zaretskii , stefan@marxist.se, 11339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > So why do we have to rely on `try-completion' here? Emacs built with > the patch below shows the behavior I want with `C-x b' using the above > recipe. I assume that are bad side effects elsewhere, but I can't think > of any offhand. I think the core of the bug is reproduced below: M-: (let ((completion-ignore-case t)) (try-completion "bah" '("bah" "bAh"))) this returns t instead of returning "bah". Probably an error in the handling of `matchcount` in `try-completion`. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 11:08:21 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 16:08:21 +0000 Received: from localhost ([127.0.0.1]:43764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkKb-0007se-4u for submit@debbugs.gnu.org; Thu, 07 Nov 2019 11:08:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkKZ-0007sO-3t for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 11:08:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSkKT-0000rk-DF; Thu, 07 Nov 2019 11:08:13 -0500 Received: from [176.228.60.248] (port=3915 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSkKS-0005H3-OM; Thu, 07 Nov 2019 11:08:13 -0500 Date: Thu, 07 Nov 2019 18:08:00 +0200 Message-Id: <83tv7fekkf.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Thu, 07 Nov 2019 11:01:01 -0500) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Eli Zaretskii , 11339@debbugs.gnu.org, stefan@marxist.se > Date: Thu, 07 Nov 2019 11:01:01 -0500 > > I think the core of the bug is reproduced below: > > M-: (let ((completion-ignore-case t)) (try-completion "bah" '("bah" "bAh"))) > > this returns t instead of returning "bah". > Probably an error in the handling of `matchcount` in `try-completion`. Are you sure? I think the return value of t is expected, per these comments in try-completion: if (completion_ignore_case) { /* If this is an exact match except for case, use it as the best match rather than one that is not an exact match. This way, we get the case pattern of the actual match. */ if ((matchsize == SCHARS (eltstring) && matchsize < SCHARS (bestmatch)) || /* If there is more than one exact match ignoring case, and one of them is exact including case, prefer that one. */ /* If there is no exact match ignoring case, prefer a match that does not change the case of the input. */ From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 11:28:05 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 16:28:05 +0000 Received: from localhost ([127.0.0.1]:43794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkde-0008Q6-9y for submit@debbugs.gnu.org; Thu, 07 Nov 2019 11:28:02 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSkdc-0008Pm-4l for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 11:28:00 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9FF2181248; Thu, 7 Nov 2019 11:27:54 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0ECB5806A2; Thu, 7 Nov 2019 11:27:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1573144073; bh=KAzL980kEht91yiRw6AsHjH3yVyOC5wskTVKm/thJWE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=N7FcPhwJP3QZJrh0fzAcB906EXbMQ8TVhmlk6BKIBB44j/22DOAjxB/KWXy+PvUgl 93FV2jtejwjtnsONPOJ+g1FdfBJCMQZBaha68PyqUMF6abxt6YrvPrGBrCIO0uKrGH VELHUgTKmsYpMkC/kFDjh6c/hpVYOU11Wrnpo+BxobgHzzMhb0ovYOdNjpdx7Ly3yS ntDSb/FOyGvh3LsKsJG1lkO/Yu0uSwmQ3g2KQnr6m13XW+Kdhior6Ff8FIKr61m09v DHnEVkQB/7WegLnHBUnRjCeUPHmrv84eC3UlOLrdrpXiJFVPwky+ralhplqtOGQUNU 9R4W4Sfgwrw7w== Received: from pastel (unknown [216.154.47.134]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B52D012038D; Thu, 7 Nov 2019 11:27:52 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Message-ID: 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> Date: Thu, 07 Nov 2019 11:27:50 -0500 In-Reply-To: <83tv7fekkf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Nov 2019 18:08:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.063 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I think the core of the bug is reproduced below: >> >> M-: (let ((completion-ignore-case t)) (try-completion "bah" '("bah" "bAh"))) >> >> this returns t instead of returning "bah". >> Probably an error in the handling of `matchcount` in `try-completion`. > > Are you sure? I think so, yes. > I think the return value of t is expected, per these > comments in try-completion: I don't think so: > /* If this is an exact match except for case, > use it as the best match rather than one that is not an > exact match. This way, we get the case pattern > of the actual match. */ This says that (try-completion "bah" '("bAh" "bahfoo")) should return "bAh" > /* If there is more than one exact match ignoring case, > and one of them is exact including case, > prefer that one. */ This says (try-completion "bah" '("bah" "bAh")) should return "bah" rather than "bAh", which also agrees with I said above (it should not return t). > /* If there is no exact match ignoring case, > prefer a match that does not change the case > of the input. */ This says that (try-completion "bah" '("bAhbar" "bahfoo")) should return "bah" rather than "bAh". Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 07 13:12:57 2019 Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 18:12:57 +0000 Received: from localhost ([127.0.0.1]:43882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSmHA-0004lo-LS for submit@debbugs.gnu.org; Thu, 07 Nov 2019 13:12:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSmH8-0004lb-Id for 11339@debbugs.gnu.org; Thu, 07 Nov 2019 13:12:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iSmH2-0005Rr-QT; Thu, 07 Nov 2019 13:12:48 -0500 Received: from [176.228.60.248] (port=3597 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iSmGz-00055z-TG; Thu, 07 Nov 2019 13:12:47 -0500 Date: Thu, 07 Nov 2019 20:12:31 +0200 Message-Id: <83h83feesw.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Thu, 07 Nov 2019 11:27:50 -0500) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: stephen.berman@gmx.net, 11339@debbugs.gnu.org, stefan@marxist.se > Date: Thu, 07 Nov 2019 11:27:50 -0500 > > >> I think the core of the bug is reproduced below: > >> > >> M-: (let ((completion-ignore-case t)) (try-completion "bah" '("bah" "bAh"))) > >> > >> this returns t instead of returning "bah". > >> Probably an error in the handling of `matchcount` in `try-completion`. > > > > Are you sure? > > I think so, yes. The patch below fixes Stefan's simplified test case, but the original problem is still unsolved: "C-x b ba TAB TAB" says "Sole completion". What did I miss? diff --git a/src/minibuf.c b/src/minibuf.c index f6cf47f..2670211 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1363,7 +1363,13 @@ DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, bestmatch = eltstring; } if (bestmatchsize != SCHARS (eltstring) - || bestmatchsize != matchsize) + || bestmatchsize != matchsize + || (completion_ignore_case + && !EQ (Fcompare_strings (bestmatch, zero, + make_fixnum (compare), + eltstring, zero, + make_fixnum (compare), Qnil), + Qt))) /* Don't count the same string multiple times. */ matchcount += matchcount <= 1; bestmatchsize = matchsize; From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 08 17:36:21 2019 Received: (at 11339) by debbugs.gnu.org; 8 Nov 2019 22:36:21 +0000 Received: from localhost ([127.0.0.1]:47885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTCrd-00079S-57 for submit@debbugs.gnu.org; Fri, 08 Nov 2019 17:36:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTCrZ-00079B-H2 for 11339@debbugs.gnu.org; Fri, 08 Nov 2019 17:36:18 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 06335449A39; Fri, 8 Nov 2019 17:36:12 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BA6F0449A18; Fri, 8 Nov 2019 17:36:10 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1573252570; bh=Z24sZr1HXFyhYpFXTWyjUbnhtYFTFQD0BbbpnoWQc0k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HRQ8riqUts+BrFH89xEyJ71X9MURxwTslFaK9h7G9w2h4u9tAfThJ1MgEiqJunocp +QRpEfP+U2Cymm6fbwOmNPWhHUz5v7xspKqeZEFNhHUBNLMbupG0mdb2vYb8uQSBN1 3W43xwdQMFSKW5ai9SQF5MuDugJ+VNQvA/14VMH/mkaRto2C0L0F9RERH77BTEeH1w Q2qht9WeZkCWZPogSev6np+UaxgVJU3P2NEjIp820JIIkYUMc07qvz2BJYBeUqMs/3 gWioZioa1Ilcoh0e3XNcHlq3isEBN0+MnN4ETLTy7B+pRCidSO9FaqTBOVqDsyX3BM bx+ft20WL9v1w== Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8794112031C; Fri, 8 Nov 2019 17:36:10 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Message-ID: 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> <83h83feesw.fsf@gnu.org> Date: Fri, 08 Nov 2019 17:36:08 -0500 In-Reply-To: <83h83feesw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Nov 2019 20:12:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.091 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > The patch below fixes Stefan's simplified test case, but the original > problem is still unsolved: "C-x b ba TAB TAB" says "Sole completion". > > What did I miss? It still fails when you swap the two elements in the list :-( I don't have time to dig into the code now, tho, Stefan (ert-deftest try-completion-ignore-case () (let ((completion-ignore-case t)) (should (equal (try-completion "bar" '("bAr" "barfoo")) "bAr")) (should (equal (try-completion "bar" '("bArfoo" "barbaz")) "bar")) (should (equal (try-completion "bar" '("bArfoo" "barbaz")) (try-completion "bar" '("barbaz" "bArfoo")))) ;; bug#11339 (should (equal (try-completion "baz" '("baz" "bAz")) "baz")) ;And not `t'! (should (equal (try-completion "baz" '("bAz" "baz")) (try-completion "baz" '("baz" "bAz")))))) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 04:20:29 2019 Received: (at 11339) by debbugs.gnu.org; 9 Nov 2019 09:20:29 +0000 Received: from localhost ([127.0.0.1]:48180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTMuz-00075R-8Y for submit@debbugs.gnu.org; Sat, 09 Nov 2019 04:20:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTMux-00075F-Ek for 11339@debbugs.gnu.org; Sat, 09 Nov 2019 04:20:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTMur-0002xD-Nz; Sat, 09 Nov 2019 04:20:21 -0500 Received: from [176.228.60.248] (port=3711 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTMur-0004of-5R; Sat, 09 Nov 2019 04:20:21 -0500 Date: Sat, 09 Nov 2019 11:20:12 +0200 Message-Id: <83eeyh9zjn.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Fri, 08 Nov 2019 17:36:08 -0500) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> <83h83feesw.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: stephen.berman@gmx.net, 11339@debbugs.gnu.org, stefan@marxist.se > Date: Fri, 08 Nov 2019 17:36:08 -0500 > > > The patch below fixes Stefan's simplified test case, but the original > > problem is still unsolved: "C-x b ba TAB TAB" says "Sole completion". > > > > What did I miss? > > It still fails when you swap the two elements in the list :-( > I don't have time to dig into the code now, tho, What about the below? It passes all the tests, and also fixes the original use case. diff --git a/src/minibuf.c b/src/minibuf.c index f6cf47f..1e87c50 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1323,13 +1323,13 @@ DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, else { compare = min (bestmatchsize, SCHARS (eltstring)); - tem = Fcompare_strings (bestmatch, zero, - make_fixnum (compare), - eltstring, zero, - make_fixnum (compare), + Lisp_Object lcompare = make_fixnum (compare); + tem = Fcompare_strings (bestmatch, zero, lcompare, + eltstring, zero, lcompare, completion_ignore_case ? Qt : Qnil); matchsize = EQ (tem, Qt) ? compare : eabs (XFIXNUM (tem)) - 1; + Lisp_Object old_bestmatch = bestmatch; if (completion_ignore_case) { /* If this is an exact match except for case, @@ -1363,7 +1363,12 @@ DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0, bestmatch = eltstring; } if (bestmatchsize != SCHARS (eltstring) - || bestmatchsize != matchsize) + || bestmatchsize != matchsize + || (completion_ignore_case + && !EQ (Fcompare_strings (old_bestmatch, zero, lcompare, + eltstring, zero, lcompare, + Qnil), + Qt))) /* Don't count the same string multiple times. */ matchcount += matchcount <= 1; bestmatchsize = matchsize; From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 12:56:46 2019 Received: (at 11339) by debbugs.gnu.org; 9 Nov 2019 17:56:46 +0000 Received: from localhost ([127.0.0.1]:50242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTUyb-0001Kr-Us for submit@debbugs.gnu.org; Sat, 09 Nov 2019 12:56:46 -0500 Received: from mout.gmx.net ([212.227.15.19]:32967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTUyZ-0001Kd-KI for 11339@debbugs.gnu.org; Sat, 09 Nov 2019 12:56:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573322187; bh=GFKQA1+w3rObY0hwePs15s9I/ALp3T90W3cvshCLLfc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=IoHaalP7KzqkMJr8C2BTbglaXi0kWEdn7EADxzxkELa6PhbcAp6fgkIcYP17cPjFM M4XaE91u5MGHy0IvZH7Gu+UpvZvJVAJP7NfV/sgIAoecmlfKfy6XZEgtagfHTVeQcd MtCxC2OHxPUSCThctfCgQUDF5/rA4erl7000dFxU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from strobe-lfs84 ([188.109.205.98]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHG8g-1ige8R0gy0-00DKf4; Sat, 09 Nov 2019 18:56:27 +0100 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> <83h83feesw.fsf@gnu.org> <83eeyh9zjn.fsf@gnu.org> Date: Sat, 09 Nov 2019 18:56:23 +0100 In-Reply-To: <83eeyh9zjn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Nov 2019 11:20:12 +0200") Message-ID: <875zjtc4s8.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:57Mk9knY2ys6ZL1EnroHFoXJ11S7uaA5ebAe/XUQeK/ZVkBNOHP jK4ekH0jL85aHD3dYUyztFieeyHAxXElD4DhoWxzYLxu5QaYhjM7V9SUUl5lZRPrBvgPO6h FvzEXN//t3oSloncLXXuAMmPviDUa1n7pgQP0o/2eM6S8eGc4GRWx1O5Sw/0AqEsfMnO23g vqAhFV3gVs62zuzrpZM4A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:37zNjJFI/9A=:VCKVnkCQ4Hj1E/h/t4JaRw M2VnTU8CSUSRCI899jobf0ao8GFssuUyxtkOwzHPNXAkXKFNWkhYN65RrOCUQr/a69C2oSu9m +MZ/WI7zaJbBel2FbwPgn1SdeAiCh8YfhToh11JgQz7lDNYcwz9nI9HcwMPiSq/q1tcS3dCEi KJDfEPaYPRZB9XyZYH4ODoQTHE9LQn0jxukoRnM/wT09TVKPmHI2/SEqwI1TKKuSpTqcGnL2g DKNIKhVcjUPXnl9gPej32FCkEgfCcyf/EyRzzIqbJdxhEpSkCq35FMqFFSVo0NP5VmtJJdsYg FUL4ZftfcDXW4M34DfIR+6GVsYNtPOVffgUwGpK4aZ9ZR5EpCIuCbs2ZzEqlNbFKZjEdeQZJ5 79Re3LqDsM2vcr5XL3pxEltjjas9LR4NLqz6XQbM/PSL3ynP3qM4osNP17B4T1iqLbW/LZsx5 VtxWv4MpV5LtVtVfPo4HhSygfpTBHYn+F7Uvg6z6b5yO79tSAYI+8Eiv0Nr4rIDy0r9qUahjX msStJitkRaeK/7jWhmAK+Cg2KAOuGp5v71B7zQztqTUhopezS4JTsJqrdpZWlxonyi9NlAbfq /ARNQwDGLcCABARQdsMiO/whqznQ0Hj9kue3VPvZQ5cXZuj7QqBx5MMdeMHLZO8whVnNhr61b 9MzU1r9v67fr+dMSABjySRLm1iddrZ9ACoj+zOMNT+YyyxQqLAaUOodhwQIgKEzH/PoglTY/Z g9BWjSvfyyt+pe3VJSRYaRR8v+88uOtJEsavZP/N3pvBun/VaNwpJnoLL3t7DRpa2I0zcZZxG VDEb5YXl0FgwLOC3iZrWQx9hcQCDDCp4d9nAUjBiv+R+StJP+uLN2K/i/4M7lsKI3ovl9YL2r uUejYiSQxCXhbYKClm7haJFrz7tKmA7afC2YrsMmrbMqEt4o9PaSep1q1NeJZra4DAEhQgz+R etlsXJUGJ4jikcGhlCNpd9sQR8tlRvat1A9A6GUWO4G9i8dXySx2tcubjNPaY82PfXf+Uobca ZtThB0YrtfIAJGzTmCIw/x1X0FRspDYQAC8rhww3EblenyLKRgj2U6WbBTp5kd/3+/xXtYiVz v1fu9QMrFsTH3hrW7s+j2p/UUg630EWk8wqDg72pHdHGh1EtiN710isLvkF8JdAaCif3ZrwSP lpJ+Dgh0zW5SeE+1GM+rwP8aYcIIODpaF5yP4kperX4UV7flR/HZtzE2WRfF7dY9QhS6bGmPc rYoUg7dwM1K3TTiLrAveXRXkuAssn2hiqxc4PE9LXWLhbeAJWKUXI6eo3NmA= Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stefan@marxist.se, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, 09 Nov 2019 11:20:12 +0200 Eli Zaretskii wrote: >> From: Stefan Monnier >> Cc: stephen.berman@gmx.net, 11339@debbugs.gnu.org, stefan@marxist.se >> Date: Fri, 08 Nov 2019 17:36:08 -0500 >> >> > The patch below fixes Stefan's simplified test case, but the original >> > problem is still unsolved: "C-x b ba TAB TAB" says "Sole completion". >> > >> > What did I miss? >> >> It still fails when you swap the two elements in the list :-( >> I don't have time to dig into the code now, tho, > > What about the below? It passes all the tests, and also fixes the > original use case. I confirm it makes completion with `C-x b' work the way I want when case is ignored, so I am in favor of installing it. Thanks. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 13:24:19 2019 Received: (at 11339) by debbugs.gnu.org; 9 Nov 2019 18:24:19 +0000 Received: from localhost ([127.0.0.1]:50266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTVPG-00023c-N4 for submit@debbugs.gnu.org; Sat, 09 Nov 2019 13:24:18 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTVPE-00023O-9q for 11339@debbugs.gnu.org; Sat, 09 Nov 2019 13:24:16 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DB8F7449A5E; Sat, 9 Nov 2019 13:24:10 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 83EF544715F; Sat, 9 Nov 2019 13:24:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1573323849; bh=lF4/64aBxPTvsTrS+GoTOvgZKyUve80dUYeENfK19SI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DFgj6o/KtY0Q7rZSsbx3cS2sM7vGpiPJ1vNYFPJxXvL43n+7Pk82xjijniza4IORB GCtJkT+vxlT3xWhzn1rUaeT2f6/1VSjhODx9J2wFCzXbbsyggYIUj09ZnHgMiOCt3Y t0Lk2IB/nzWqrJdwloiVU7p9jZtm5w1bom0s+QSyfCK9k9swirIyHs0bbc25rONq4+ y4bYwDJJ4iy4+o8hq0TGRNxldi3uMpDLYONYaziJanRCzbO2/xKPKnTmDd9zOYrV61 sODp1dC4rame2vT1QMBFLedblfq6C4vWRuyewDMNwWQGEOllwJJ+xkcNuTVWWgXkjs A6axRMRSidX8Q== Received: from pastel (unknown [216.154.47.134]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E8A0812096D; Sat, 9 Nov 2019 13:24:08 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Message-ID: 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> <83h83feesw.fsf@gnu.org> <83eeyh9zjn.fsf@gnu.org> Date: Sat, 09 Nov 2019 13:24:06 -0500 In-Reply-To: <83eeyh9zjn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Nov 2019 11:20:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.104 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339 Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > What about the below? It passes all the tests, and also fixes the > original use case. Sounds good. I have the impression that I was the original author of that "early exit" optimization (or at least some of it), but my brain must be decaying because I have a hard time understanding the code. I also wonder if it's really worth the effort (of the optimization, I mean). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 14:57:54 2019 Received: (at 11339-done) by debbugs.gnu.org; 9 Nov 2019 19:57:54 +0000 Received: from localhost ([127.0.0.1]:50304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTWrq-0004MI-CP for submit@debbugs.gnu.org; Sat, 09 Nov 2019 14:57:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTWrm-0004M4-OK for 11339-done@debbugs.gnu.org; Sat, 09 Nov 2019 14:57:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTWrg-0008Kl-Sr; Sat, 09 Nov 2019 14:57:44 -0500 Received: from [176.228.60.248] (port=3635 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTWrf-0001zw-Qz; Sat, 09 Nov 2019 14:57:44 -0500 Date: Sat, 09 Nov 2019 21:57:36 +0200 Message-Id: <83h83c961b.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Sat, 09 Nov 2019 13:24:06 -0500) Subject: Re: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii 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> <87h83jy5kp.fsf@gmx.net> <83v9rzh8gs.fsf@gnu.org> <875zjzy0yg.fsf@gmx.net> <831rulgcw3.fsf@gnu.org> <87wocb21so.fsf@gmx.net> <83tv7fekkf.fsf@gnu.org> <83h83feesw.fsf@gnu.org> <83eeyh9zjn.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11339-done Cc: 11339-done@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: stephen.berman@gmx.net, 11339@debbugs.gnu.org, stefan@marxist.se > Date: Sat, 09 Nov 2019 13:24:06 -0500 > > > What about the below? It passes all the tests, and also fixes the > > original use case. > > Sounds good. Thanks, installed. > I have the impression that I was the original author of that "early > exit" optimization (or at least some of it), but my brain must be > decaying because I have a hard time understanding the code. I also > wonder if it's really worth the effort (of the optimization, I > mean). AFAICT, you were the author of the "don't count the same string more than once" fragment. I'm closing the bug report. From unknown Mon Jun 16 23:54:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 08 Dec 2019 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator