From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: completing-read depricated initial-input Date: Thu, 23 Jun 2022 13:26:13 +0200 Message-ID: <87h74bhar6.fsf@gnu.org> References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <87bkuljsvz.fsf@yahoo.com> <86fsjvlrjo.fsf@gnu.org> <874k0bkco7.fsf@dataswamp.org> <87letnhhj3.fsf@gnu.org> <87zgi3itb7.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9578"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.28; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 13:37:55 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 1o4L9l-0002HI-T2 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 13:37:53 +0200 Original-Received: from localhost ([::1]:36724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4L9k-0007Sn-9Z for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 07:37:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4L8j-0007SH-PV for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 07:36:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4L8j-0001p1-6M; Thu, 23 Jun 2022 07:36:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=9a9G1uS6+HX7PHVyzRqT5kSYmNDog8uy31jdEVg6018=; b=fn9/b5Onk+hdT6 uo72JrN0Kx/PUJNZlilGSLn88gOObwE+nmfFVw6unTMKE/ZuXCi7uf0sn8kI27ArDICGhpjWYg0n5 82HSWuRIjbk4WzRTdlTZXoOI4GY2QwX3UuwReQ0nBWclioA+YptsCgmn1X3yYQFwg2QJ3E8HmokiN L9rxhI8/FfEUM6eEha4FJSFiGlf6rz2nGQRD37QXXw/Gq/OIa0yKvIUhahUab0RBYYOZkG0YKzVDD D4tmzgrza7JFqexvYJ/vLZnXlxMlUnZhED6b2/Zj+DxJalPQ5F0mpEws9CA2v86l6O5OZACIXznd/ xt+hFBHGtzXk+Bx2OrIA==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:35921) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4L8i-0001g9-Vu; Thu, 23 Jun 2022 07:36:49 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 924A027C0054; Thu, 23 Jun 2022 07:36:47 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 23 Jun 2022 07:36:47 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefjedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecuggftrfgrthhtvghrnhepudejtdehuddvleffjeekteegvdehleehvdeufe fhueekkeekhedvgfeggeffvefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlih hthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgr shhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jun 2022 07:36:46 -0400 (EDT) In-reply-to: <87zgi3itb7.fsf@dataswamp.org> 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:138012 Archived-At: Emanuel Berg writes: >>>> Improved user experience? >>> >>> Why/how so? >> >> You have to delete the initial input if it's not what you >> want or if you want to see the other possibilities. >> So basically all occurrences where INITIAL-INPUT is used as >> a kind of default value are better handled with the >> DEF argument. > > I know but ... why are you telling me this? Because you've asked why/how not using INITIAL-INPUT with completing-read has an improved user experience. > IMO this is the best way of doing it: > > (let ((name "Danger")) > (read-string (format "name: [%s] " name) nil nil name) ) But it has nothing to do with completing-read. >> The only places where I can see it's useful is when all >> possible completions have a common prefix [...] > > It is useful there but only in terms on relying on completion over a > huge set of pretty much similar symbol names which is a situation that > shouldn't be encouraged to begin with, and neither should completion > BTW. Huh? Completion is a must especially when there are many and similar completions. Would you consider M-x/C-h {f,v,etc} without completion being a good user interface? > And, alltho, as Merlin the Great Wizard was fond of saying, there is > no right or wrong, just what is and what isn't, it still holds that > two wrongs don't make one right. Sure. But the thing is that people writing packages usually don't provide an option if INITIAL-INPUT should be used or not. Therefore, whatever choice they make is forced upon their users (well, unless the user knows of :filter-args advices). For that reason it makes sense to document a guideline on how to do things as Arash cited in <86mte3lsj2.fsf_-_@gnu.org>. Bye, Tassilo