From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier 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 11:27:50 -0500 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236375"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 11339@debbugs.gnu.org, stephen.berman@gmx.net, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 07 17:29: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 1iSkel-000zN8-TP for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 17:29:12 +0100 Original-Received: from localhost ([::1]:45080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSkek-000682-Rp for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 11:29:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41278) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSkee-00067i-Te for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:29:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSked-0001x5-Us for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:29:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSked-0001wz-Rp for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:29:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSkec-0008Rf-F5 for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 11:29:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 16:29: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.157314408532386 (code B ref 11339); Thu, 07 Nov 2019 16:29:02 +0000 Original-Received: (at 11339) by debbugs.gnu.org; 7 Nov 2019 16:28:05 +0000 Original-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 Original-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 Original-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) Original-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== Original-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) In-Reply-To: <83tv7fekkf.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Nov 2019 18:08:00 +0200") 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:171095 Archived-At: >> 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