From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: completing-read depricated initial-input Date: Thu, 23 Jun 2022 17:05:16 -0400 Message-ID: References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <86mte3lsj2.fsf_-_@gnu.org> <871qvfoce1.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3357"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Arash Esbati , Drew Adams , Christopher Dimech , "eliz@gnu.org" , Help Gnu Emacs , "carlmarcos@tutanota.com" To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 23:06:44 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 1o4U2F-0000hZ-MW for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 23:06:43 +0200 Original-Received: from localhost ([::1]:40984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4U2D-00081c-Ed for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 17:06:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4U11-00080m-UF for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 17:05:30 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:52073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4U0y-0001cJ-6U; Thu, 23 Jun 2022 17:05:26 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 01460441D05; Thu, 23 Jun 2022 17:05:22 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B1439441D13; Thu, 23 Jun 2022 17:05:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1656018320; bh=ac4MA+8Ie00I/tsuqoJt5EgNp8YDTIAO0lqKTSp/Y6g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BMwnidB9RR9vFJpxj9FfCcEkEY2by1ZaSPmK61n/6S92byDH5ecGDCIDfHCqYAjRC kgq6JTk/8LFt1aqtAUP+X3fFg74T3vNwcR+c87o1z40fXM6EiHP7t7M16Ca2eAEhLC JWYquc/I4I1u4aNdtDNnpYs1tPEDAtEyTVKSbtsx71inlEolFqsnSoVsBQKNSADeDf cFwOhTzVbS3XId7fZqybvfNT7Psil9iilJIzgAlwbBloLBnbL0zic83QRmTbdjcOo5 n0JEb4leNx+IldDuk9GpT11heGnccxXGM5QGZS/ML3q2fIx9QJ/zchDUyamwQ13g03 OmctFTvOoRaCA== Original-Received: from alfajor (196.214.25.93.rev.sfr.net [93.25.214.196]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3A9441203D4; Thu, 23 Jun 2022 17:05:19 -0400 (EDT) In-Reply-To: <871qvfoce1.fsf@web.de> (Michael Heerdegen's message of "Thu, 23 Jun 2022 13:19:34 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:138039 Archived-At: I haven't really followed that thread, but IMO the `initial-input` arg should be changed into `setup-function` (so we don't have to use the hideous `minibuffer-with-setup-function` hack) and using a string there should be deprecated (the rare places where inserting an initial string makes sense can use a setup-function instead). Also the prompt handling should be changed so that it automatically inserts the default into the prompt. Doing that in a reliable and backward compatible way is not completely straightforward, tho, so maybe a simpler solution is to introduce a whole new function instead. Then a user-customization could also be used to choose between the current default (where the default is added to the prompt) or the other option of always inserting the default as initial value (pre-selected so it can be deleted with a quick DEL). Stefan