From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime 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: Sun, 27 Aug 2023 21:11:27 +0000 Message-ID: References: <596919925b4762b66be8@heytings.org> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8450"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , 65459@debbugs.gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 27 23:13:22 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 1qaN4T-0001zM-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Aug 2023 23:13:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaN47-0004c8-LH; Sun, 27 Aug 2023 17:12:59 -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 1qaN46-0004bv-Bj for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 17:12:58 -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 1qaN44-0007HG-Vz for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 17:12:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaN4A-0007SS-Do for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 17:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Heime Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Aug 2023 21:13:02 +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.169317072528578 (code B ref 65459); Sun, 27 Aug 2023 21:13:02 +0000 Original-Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 21:12:05 +0000 Original-Received: from localhost ([127.0.0.1]:46373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaN3B-0007QO-Nr for submit@debbugs.gnu.org; Sun, 27 Aug 2023 17:12:05 -0400 Original-Received: from mail-40135.protonmail.ch ([185.70.40.135]:55179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaN37-0007Q5-7i for 65459@debbugs.gnu.org; Sun, 27 Aug 2023 17:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1693170704; x=1693429904; bh=IExAErMHE57wZFZ6+Y0yE0/5GSuet8+liRfl2/AFdiw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=LQllOU8MkqJ1QUTZ+TkOSvmZZNDJAOK7JXP+Ulv05wTlcZfzUk+6aRBPvmB3K2Bfd nOREmfa8Gx1eJv7KGey5ul0MCdGETI3+0mKL0gKpYDZ3a75NgVe/vdaF7dwc85+sN6 5E2/+MfF75xh6iLi0ALtuvzVfDwzMU1ytpOG8A+3JwnfbeSSQ77vjgvw17MQprrUSP 7eQO5zsOkTsCgvzVZT3o8fwa4CHfO/0tHwI9145sTrBfRn+v0iZ2wqHb2BqBX2Zqg9 MW7zAo8ZmCcnlpmXISdQhywkzMtrHYISRGicW8SvATQYjDeJjFDUirBM0ZmqqkGVve DLLWhGlTtRa/w== In-Reply-To: Feedback-ID: 57735886:user:proton 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:268589 Archived-At: Sent with Proton Mail secure email. ------- Original Message ------- On Monday, August 28th, 2023 at 6:01 AM, Stefan Monnier wrote: > > > Whether the default only shows up when instructed is a UI issue, whic= h > > > can/should be under control of a UI customization. - Stefan > > > I would need an example. Suppose one changes the UI customization, wo= uld that > > > apply to all calls of that function ? I would want prefilling occasio= nally. > > > Would that be possible ? =20 > There are some cases, such as `read-file-name` where we do want some > prefilling, so of course it's possible, but it has to be linked to some > specific property of the thing we're requesting from the user and how it > relates to the string with which we want to prefill the buffer. I am proposing a broader use. I meant an example of how a programmer can include minibuffer prefilling. It seems that the functionality exists but not well known or understood. If minibuffer prefilling has been possib= le for us in `read-file-name`, then the possibility should also be provided to= =20 programmers and users devising their own functionality. =20 =20 =20 > So it goes back to the question of why you want this specific call to > `completing-read` to be prefilled. The answer shouldn't be "because > I prefer it this way" (that answer should be satisfied instead by > a customization setting since it may not apply to other users of that > code). >=20 > E.g. in the case of `read-file-name` it's because in 99% of the cases > the end result wants to include all or most of that prefilled string. >=20 > > All these UI accept any entries by the user. Customarily all minibuffer input from the user is allowed to be entered. I claim automatic prefilling can be considered a form of user input, if=20 they code their own function with prefilling in mind. =20 > I don't know what you mean by that. >=20 > > I am of the school of thought that doing so automatically is also > > a valid operation. > And I didn't understand this part either. > Stefan There are two audiences in all this. Programmers who write libraries and users who write functions for their own use. The thought is that if `read-file-name` has capability of minibuffer prefilling, then minibuffe= r prefilling capability should be available for them to use without having them convince anybody why they want it to happen. =20 I consider the statement "I prefer it this way" legitimate, because in emac= s=20 users have the capability to add functionality for their personal use, and = their decisions would not affect other users of that code. Did some more thinking about all this and can see the possibility of INITIA= L to become much broader. For maintainers of libraries for public use, the c= ode=20 could need some elaboration, but not much for personal use cases. be