From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH Date: Wed, 23 Aug 2023 23:06:24 +0000 Message-ID: References: <83jztmro8z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10797"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65459@debbugs.gnu.org, Eli Zaretskii , Heime To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 24 01:07:15 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 1qYwwV-0002Zk-HN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Aug 2023 01:07:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYwwG-0008IZ-7D; Wed, 23 Aug 2023 19:07:00 -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 1qYwwE-0008IL-Iy for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 19:06:59 -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 1qYwwE-0002Vg-A6 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 19:06:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYwwH-00058m-TA for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 19:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2023 23:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65459 X-GNU-PR-Package: emacs Original-Received: via spool by 65459-submit@debbugs.gnu.org id=B65459.169283199319717 (code B ref 65459); Wed, 23 Aug 2023 23:07:01 +0000 Original-Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 23:06:33 +0000 Original-Received: from localhost ([127.0.0.1]:35531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYwvp-00057x-2m for submit@debbugs.gnu.org; Wed, 23 Aug 2023 19:06:33 -0400 Original-Received: from heytings.org ([95.142.160.155]:51236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYwvm-00057m-Dh for 65459@debbugs.gnu.org; Wed, 23 Aug 2023 19:06:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1692831985; bh=zuUctVeEryGz4NlQ04s/rbtx5zRQPySFI0v4MH8AFBE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=UxA33diMVdi7GUNjy2hdqsoVSd8bkBhw9oM2OMBuoRJv1d6fuTPNc0QtNka4Zl21m 9ODoBtqcucx+hmHUgKgFztiV8vmCsC5bA5VJr8KSewveiYesAuchX+bCeOThR78uzr lxkuTxDXbHBlvr9+evCdF6mTQjV7XvHW38f9HrivCvlATBVYQwqLZVbt2SNiPUI+u4 ols+UdDoEnZV8psGUSm8mwDW31eMwuRjR/UHMidYA9ZSp3UU2wFXjxZeuOjYfuTDT1 SDPHYyFIXpS0/4U6GltBfWUhrxSeWSfPdpVEBcNuDt0zFJLICriQNsxzztfIRIoC4R EkTOjzxl/zktw== In-Reply-To: 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:268278 Archived-At: > > But at this point do you consider the behavior of > > (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta"))) > (completing-read (format-prompt "Grapheme" "alpha") > cseq nil t nil nil "alpha")) > > to be a good solution for your original problem? > Is this not a better solution to his original problem? (defun my-completing-read (prompt collection start) (minibuffer-with-setup-hook (:append (lambda () (setq-local actual-minibuffer-default-add-function minibuffer-default-add-function) (setq-local minibuffer-default-add-function '(lambda () (setq minibuffer-default-add-done nil) (funcall actual-minibuffer-default-add-function))) (next-history-element start) (move-end-of-line nil))) (completing-read (format-prompt prompt nil) collection nil t))) (my-completing-read "Grapheme" '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta") 1)