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#65348: INITIAL-INPUT in completing-read repeats same entry twice consecutively Date: Thu, 17 Aug 2023 13:45:27 +0300 Message-ID: <83msyq54mw.fsf@gnu.org> References: <83edk26wwu.fsf@gnu.org> <837cpu6sp6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31973"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65348@debbugs.gnu.org To: Heime Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 17 12:46: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 1qWaW5-0008BP-20 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Aug 2023 12:46:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWaVw-0007Vn-3b; Thu, 17 Aug 2023 06:46:04 -0400 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 1qWaVu-0007VX-PO for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 06:46:03 -0400 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 1qWaVu-0000xY-Gv for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 06:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWaVu-00024d-4Y for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 06:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Aug 2023 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65348 X-GNU-PR-Package: emacs Original-Received: via spool by 65348-submit@debbugs.gnu.org id=B65348.16922691297927 (code B ref 65348); Thu, 17 Aug 2023 10:46:02 +0000 Original-Received: (at 65348) by debbugs.gnu.org; 17 Aug 2023 10:45:29 +0000 Original-Received: from localhost ([127.0.0.1]:42847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWaVM-00023l-QA for submit@debbugs.gnu.org; Thu, 17 Aug 2023 06:45:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWaVK-00023V-IF; Thu, 17 Aug 2023 06:45:27 -0400 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 1qWaVF-0000jY-3k; Thu, 17 Aug 2023 06:45:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=KIvP8MkZnR1hUWOvuvifjSbMxot2u6Prrbrr+HJUOJ0=; b=So61ZXrlni5V1glzkxWK UJNP/1qRIxVlnH8fBnbeg5zubmN6AYOy9XdyZRyPM01SL+t8ClvJ4/yG/Oqt/40RimdhrOMfYEwyn I0ChA7YmSoxAN5ZW7wgf59xQeS2by/VIEiXgqBedYgJdJY4Oaaz9rwuopXJZ2uQeRFrfakwZvxRYR n4FpnIg9tMxN1o2Y9dqzdeRcop4lUlC0DME+G5AV1MeDMMQu4JxY3jGhTR2HmniWBxS3jsdHV/NKH POe3kQ6MwQMtBoEHrqp+XTRkyZsOc5yS63a4fc7hYmT5ma90/ag/myAkEPinQe9qKwk8XevHwkNrE NnzyPEP05jJXTA==; In-Reply-To: (message from Heime on Thu, 17 Aug 2023 10:27:27 +0000) 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:267653 Archived-At: tags 65348 notabug close 65348 thanks > Date: Thu, 17 Aug 2023 10:27:27 +0000 > From: Heime > Cc: 65348@debbugs.gnu.org > > The collection COLLECJ is this ordered sequence > > "boxplus" "boxtimes" "Cap" "centerdot" "circledast" > > with the call to COMPLETING-READ being > > (completing-read "PROMPT: " collecj nil t "boxplus"))) > > Where REQUIRE-MATCH is t > > and INITIAL-INPUT is "boxplus" > > Now, the user gets the prompt with "boxplus" displayed. > > The user moves to the next completion candidate, which is also "boxplus", > the entry at the beginning of COLLECTION. Which is why the ELisp manual says: The argument INITIAL is mostly deprecated; we recommend using a non-‘nil’ value only in conjunction with specifying a cons cell for HISTORY. *Note Initial Input::. For default input, use DEFAULT instead. In any case, the fact that you see "boxplus" as the first suggestion of the "future history" is because you both added it to COLLECTION and set INITIAL to it. So showing it as the first suggestion is exactly what completing-read should do in this case. This is not a bug, and so I'm closing it.