From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67210: 30.0.50; completing-read with REQUIRE-MATCH=t can sometimes return a non-match Date: Thu, 16 Nov 2023 07:38:40 +0200 Message-ID: <8334x6qmu7.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27292"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67210@debbugs.gnu.org To: Spencer Baugh , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 16 06:39:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r3V5t-0006tr-17 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Nov 2023 06:39:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3V5k-0007Ot-GS; Thu, 16 Nov 2023 00:39:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3V5i-0007OQ-FP for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:39:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3V5i-0007jQ-7E for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3V5h-0006uH-Kr for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:39:01 -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, 16 Nov 2023 05:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67210 X-GNU-PR-Package: emacs Original-Received: via spool by 67210-submit@debbugs.gnu.org id=B67210.170011313626537 (code B ref 67210); Thu, 16 Nov 2023 05:39:01 +0000 Original-Received: (at 67210) by debbugs.gnu.org; 16 Nov 2023 05:38:56 +0000 Original-Received: from localhost ([127.0.0.1]:54308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3V5c-0006tx-8l for submit@debbugs.gnu.org; Thu, 16 Nov 2023 00:38:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3V5a-0006tl-LQ for 67210@debbugs.gnu.org; Thu, 16 Nov 2023 00:38:55 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3V5V-0007hG-Kf; Thu, 16 Nov 2023 00:38:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=c9OM5tqKEkDDJUD/rRfifAEA2xzrXo6LsRk/BLSU11Q=; b=fiBirBufYz8x XkQiZk6IeNfRwfTWfGMprZP9FaIWKY46ZzW/9iORB2UNVKv2RXzNAPRhgsUc4VFj9kgsi54xCsoTk A5iYCZwi+CAjYpfeN8ZkjrgGepHULG/4w73MBDc+3Kf/5wSP9sppddm0udRcRwIEkeAcLfJdZ9E4b a/KbWrQSmWuYTt0MRoigSqztaHcn+BSeWR/4BGCfh31HLy8HpvFt38jHhOnejbpbBd9IoyXl5YSD3 VKeDDPTMtwvxtnlXy37jc25ZWSYU8oY4IDSgiWTCnDOLQqTDgnHb6ghiUkTFNwZWrZy2xqvqFE4wJ AfZ0lexxZt21qWpNED11sQ==; In-Reply-To: (message from Spencer Baugh on Wed, 15 Nov 2023 15:25:15 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274434 Archived-At: > From: Spencer Baugh > Date: Wed, 15 Nov 2023 15:25:15 -0500 > > > 1. emacs -Q > 2. (completing-read ":" '("foo") nil t '("foobar" . 3)) > 3. RET > 4. See "foobar", i.e. "foobar" was accepted as input despite not being > in the collection we're completing over. > > I believe this is because > (completion-try-completion "foobar" '("foo") nil 3) > returns t, which completion--do-completion interprets as meaning that > the input string is an "Exact and unique match." > > That t is returned because > (completion-emacs22-try-completion "foobar" '("foo") nil 3) > returns t. > > So perhaps completion--do-completion is wrong in assuming that a t > return value from completion-try-completion indicates an "Exact and > unique match."? > > Or perhaps completion-emacs22-try-completion is violating the spec of > completion-try-completion, and should be returning nil in this case? Adding Stefan to the discussion, as he probably has an opinion about this.