From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11339: 24.1.50; read-{buffer,file-name}-completion-ignore-case fails on non-ascii Date: Thu, 07 Nov 2019 18:08:00 +0200 Message-ID: <83tv7fekkf.fsf@gnu.org> 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> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="150519"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 07 17:09:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSkLO-000czm-Te for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 17:09:11 +0100 Original-Received: from localhost ([::1]:44850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSkLN-0005xW-Hs for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 11:09:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38171) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSkLH-0005x7-F7 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:09:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSkLG-0001IB-E0 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:09:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34943) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSkLG-0001Hz-Av for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSkLG-0007tn-39 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11339 X-GNU-PR-Package: emacs Original-Received: via spool by 11339-submit@debbugs.gnu.org id=B11339.157314290130301 (code B ref 11339); Thu, 07 Nov 2019 16:09:02 +0000 Original-Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 16:08:21 +0000 Original-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 Original-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 Original-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 Original-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 In-reply-to: (message from Stefan Monnier on Thu, 07 Nov 2019 11:01:01 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171092 Archived-At: > 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. */