From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: RE: [External] : completing-read depricated initial-input Date: Fri, 24 Jun 2022 21:33:16 +0200 Message-ID: References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <86mte3lsj2.fsf_-_@gnu.org> <871qvfoce1.fsf@web.de> <87zgi2tqwt.fsf@dataswamp.org> 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="40138"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 24 21:34:53 2022 Return-path: Envelope-to: geh-help-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 1o4p4v-000ABv-9U for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 21:34:53 +0200 Original-Received: from localhost ([::1]:55536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4p4u-0000cP-13 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 15:34:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4p3a-0000af-8m for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 15:33:30 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:60009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4p3V-00049l-4M for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 15:33:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656099196; bh=h8AkMNxDnRbf/xTVYCoT4fhldq+vioUCqhoaA4IE6Fw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=kMOaA0QiF+7Nkrb5R6zNzt3Q4eryT8PPsW9QZzHfd9Aq0CCiQAPAU83le+9ixZevT eBavYun9DolEiLY6P9Yv7AO0p4migJ2gj+te9GPZ1cSLXC7UME/jG4BGC+BMiu/Niz 91RYYtDsLMotSMhYqI2qURxjPrbyDGy56vZ5S7lE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Fri, 24 Jun 2022 21:33:16 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:qRZxJ3DvXDc5G2kJsvF4YeMDCFEbV+sXP0EvciSGihta20f8AIClz8BOWdj5z6ZhrxMtb 6NLLkJYOb4MkWJdjrpB7my1m69YGOVOSH+uT/1jXxtKdaaeumuV6m9ueJOyWUxOOQWK4FKsTwMm4 CpdNQwrqAhvu/IbBK4oCPcuj3pq8uoO+fAK3B1Mq1k1KfPncerLKvZb/UatLmHIbfSPiIEJs6f0P TQexqRRAUKft/LnfETJA5vPvPRGsatTkzYMjs1fHwO9vIghm/QkF/esm8Y1QCzoFGtaGM662dez9 bY= X-UI-Out-Filterresults: notjunk:1;V03:K0:9Vvqdrq6+kk=:MWemPoblfvPlhqerwdNTSE yuMeoYWel/X3EpE/+ccKQUmPMJHLIa1CdBYP+rjYN/qoq6gWgpO2lPoHggSgebMsChs8W7hjE fvqGaNcTuz1D49RV8BPEfHJ19qUreN4gk7b7v/1VCW8MUSCquVojgpHa1RwfSFEmQhUZXIXD4 1AadGYr+m5l2CukrSbp3fufoyA3uGb5stt5w2NwLNNVxueyIsFK4w+AH+7PmJoA3d3APbOZ9s VJRoV96erMMphicuvLhE9OzVVlHy1FYEwC7QVusBWhxDovHPXLGmBScavaF7BxqReY9u6ywR9 kktRwSXl6dQEAsVghRCPhuLDEfI6QAhaB/xw5fxjV8gzV1Rg0iVNC1UUuO7pRJV426ohswKgc S2WiwP4EhSPxGXDz79gTdRG+gWjrHHOyYHUaRtckdieOda4SWExQ6z8/4pY7xZolYQLyisMpd VEINMWsbFpVr8B1kYAACAhL7/v1u3KEy1DFrvSNoop31tQAlBuKe6Cxscf9QwtyVcLOS9yLlD zN8dLp/ZbCnPe3quQ+vkkKXpGgcPL4pLvm4Xz3EtGKEdojLoIVVwXKqbT3qK4LHNfxpzAUp2a y+AkuaIMXhDl+VYOEGq4kflECxM/p52WQ6sSTnLjxOdyL5V3AyBbNHHIoAWlVY4A0cJJEBEUY ovvXyukrK4HthErkuHWd8LxmqNBBBSiSggtT79oWZ0gunGGEU3sfaiWZx5DVUwlV5tZ+vLDgR seBV27ykrrfPMZCxIE09z9YvIjBf35aH4ZijaTt99yUG/ZHJO41zSGvQ/ZaeamAWcfyjsX/e Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138084 Archived-At: > Sent: Saturday, June 25, 2022 at 2:30 AM > From: "Drew Adams" > To: "Emanuel Berg" , "help-gnu-emacs@gnu.org" > Subject: RE: [External] : Re: completing-read depricated initial-input > > > I already asked, what concept is the initial value? > ... > > "Why is the computer putting stuff there? It's > > the area where the human user should put stuff." > ... > > There is only one use case (completion with a > > common prefix) > > Please read (again?) what others have written. > > First, it's initial _input_, not initial value. It's > about prefilling the minibuffer with particular text, > which you can use any way you like (e.g. edit it). > > A common prefix is only one such use case. (For one > thing, prefix completion isn't all there is nowadays.) > > As the arg to `completing-read', `read-from-minibuffer', > `read-string', `read-buffer', `read-minibuffer', etc., > it's unrelated to any default value. (More precisely, > it's not _necessarily_ related.) > > There's no reason it shouldn't be possible to provide > you an initial-input that's useful for editing, even > one that might not be directly related to any default > value. > ___ > > As for inserting the _default value_ (not the INIT arg) > in the minibuffer automatically: a user might want that. > You might not; others might. This should be a user > choice, not imposed one way or the other. > > As I said: > > If you often want to use or edit the default value, > then consider setting `icicle-default-value' to > non-`nil' and non-`t' [to insert it in the minibuffer]. > > If you rarely do so, then consider using `nil' or `t' > [to not insert it]. > > As one user, I'm in the former camp: I often want > to use or edit the default value, and as a result I > prefer that it be inserted automatically. > > That is, I prefer to hit a key to delete it, in the > (fewer) cases where I don't want it, than to have to > hit `M-n' to insert it, in the (more numerous) cases > where I do want it (including to edit it, rather > than just accept it as is). > > Remember that minibuffer reading is not always, or > even usually, a must-match situation. Even for > completion, there's lax completion (REQUIRE-MATCH > nil). > > With well-designed code a `completing-read' call > with lax completion can nevertheless provide a > helpful default value - e.g., one that I might want > to edit slightly. > > Of course, a `completing-read' call that gives you > a poor default value lessens the utility of using > it, and so lessens the usefulness of inserting it. > > Again, this want-or-don't-want-DEF-inserted is akin > to whether to use `delete-selection-mode'. I do > use that mode. Users are different. > > And it's important, IMO, to have a single key to > empty the minibuffer, regardless of where point is. > In `icy-mode' that's `M-k', by default. Vanilla > Emacs still has no such key. (Why not?) > > Neither (1) having to use `M-n' to insert the > default, nor (2) having to use `M-k' to erase its > automatic insertion, is super bothersome. Each > can make sense and be preferred by some users. > That's all. > ___ > > Summary: > > 1. There are uses for an initial-input arg. > 2. Automatic insertion of the default value can > be useful and preferred by some users. Let > users choose. > 3. Emacs shouldn't deprecate, let alone get rid > of, an initial-input arg for `completing-read'. > In fact, it should consider adding one for > some functions that don't have it - some of > the `read-*' functions, for example. I fully support the summary as well.