From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH Date: Wed, 23 Aug 2023 17:27:56 -0400 Message-ID: References: <83jztmro8z.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15200"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 65459@debbugs.gnu.org To: Heime Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 23 23:29:24 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 1qYvPn-0003iz-K4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Aug 2023 23:29:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYvPS-0007vT-Cu; Wed, 23 Aug 2023 17:29:02 -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 1qYvPQ-0007v1-Ol for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 17:29:00 -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 1qYvPO-0000ab-A0 for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 17:29:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYvPR-0005Te-JC for bug-gnu-emacs@gnu.org; Wed, 23 Aug 2023 17:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2023 21:29: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.169282609520997 (code B ref 65459); Wed, 23 Aug 2023 21:29:01 +0000 Original-Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 21:28:15 +0000 Original-Received: from localhost ([127.0.0.1]:35272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYvOg-0005Sa-IY for submit@debbugs.gnu.org; Wed, 23 Aug 2023 17:28:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYvOa-0005SL-PK for 65459@debbugs.gnu.org; Wed, 23 Aug 2023 17:28:12 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C27C0805D6; Wed, 23 Aug 2023 17:27:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1692826078; bh=9Ac4eW7GVyW3i1Ax8igUvJiVghNO7djzafhrEjDKzS8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=P4X8e8q+9fuYlpGx9bPeXhabrJXdBbTseJ4PcU7XsXdbW46xpkeXe2FQ9L04A4SzU j1xOIJFvwYJZXJ+/5enUXe0FK0JMHGCpIPH2xj1bMJpFSPnHncaG2Dw8WZKP+sIjKl MfAtp/n1d2jHsTFcVJqDKr38nPKmNhuY1rvibLaZII7GaM4AlfacY34NAcEuP/gHCe ILuHoIedKOLOIKdqXncH90/YOsokHvSH2IYbIqHR3SGLUdDMm2L4w8O944HfHhxGcY 2Ze29bM21B+4V2uGl+4AUA6NKYF6R2c5//EAJDzWLZX3FCxHRZvJmgzU6rXUdq/cgw FrdjXeZtBFTyA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 67A4780292; Wed, 23 Aug 2023 17:27:58 -0400 (EDT) Original-Received: from pastel (unknown [104.247.227.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 417C912022B; Wed, 23 Aug 2023 17:27:58 -0400 (EDT) In-Reply-To: (Heime's message of "Wed, 23 Aug 2023 18:12:22 +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:268273 Archived-At: >> The normal/recommended call looks like: >> >> (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta"))) >> (completing-read (format-prompt "Grapheme" "alpha") >> cseq nil t nil nil "alpha")) >> >> [ Yes, it's a bit cumbersome: hysterical raisins :-( ] - Stefan > > Correct. The solution involves an unwieldy parameter configurations, and possibly > using convoluted workarounds to achieve the desired behavior. This scenario implies > that using the function as intended requires a level of effort, understanding, and > manipulation that goes beyond direct usage. Agreed. That argues in favor of introducing a new function. But that new function would be so similar to `completing-read` that it will lead to users wondering when to use which or why there are two unless we mark `completing-read` as obsolete, which would in turn cause a lot of warnings in a lot of packages and code churn. So, we've been hesitating to make this change for a while, not sure which choice is least bad. 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? [ BTW, to me the main benefit of a new function is that we could try and make it so that the user can choose between a UI where the default is not inserted in the initial minibuffer (as in the above code), or one where it is (presumably pre-selected so you can delete it with a simple DEL), as is common in many other applications. ] Stefan