From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: carlmarcos--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: completing-read depricated initial-input Date: Thu, 23 Jun 2022 13:48:35 +0200 (CEST) Message-ID: 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> <87h74bhar6.fsf@gnu.org> Reply-To: carlmarcos@tutanota.com 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="36174"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 13:51:47 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 1o4LND-0009Ih-OS for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 13:51:47 +0200 Original-Received: from localhost ([::1]:43658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4LN8-0004aw-LC for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 07:51:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LKB-0004YS-Rt for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 07:48:40 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:48528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LK9-0003rU-Om; Thu, 23 Jun 2022 07:48:39 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 8F1D1FA0EA0; Thu, 23 Jun 2022 11:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1655984915; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=xz4M63Dusf9bgeAXDRCrxbKpqulr5qJ2gAnqEmb4AxQ=; b=W1VcyploaqKhbETxTbbnr6WE20Y3xpcHzoTW3aKQ1HXAazy/Lk1n4O4JdaV36dCj euGK6sJd/dZlhJ86F3CDDl1rNIUsKnddqdtYEua0hVVYPlBTCzFkIGSJ2zgeNrhbPGK zFSvDhwwWxCeTZtEPQmCCYSJ17sSqEqfR9k2nz9KnhE0roXCBp4+eB8b7FkqqmxBYId kg3HjwSW/s82VpYT6UX5JhqX8M7tn3Qw9aFcY9NW52ESreoPVl4L59O+sqMeVE/Y3ue WC8jJttQKXsyXC8O8R3akzvmbBr7PpwvPu3TishqCIogNzhlKdf75hDhSkKo4sW6KsP SaLVgP1FbA== In-Reply-To: <87h74bhar6.fsf@gnu.org> Received-SPF: pass client-ip=81.3.6.162; envelope-from=carlmarcos@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:138013 Archived-At: Jun 23, 2022, 11:26 by tsdh@gnu.org: > 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>. > So now emacs is getting into the habit of trashing code by looking at writt= en packages by figuring out what is not usually done by the majority?=C2=A0 It= is a bad strategy, to say the least.=C2=A0 Even worse, it looks as if the documentat= ion in putting in people's head that INITIAL-INPUT should not be used in any function wher= e it is defined as an argument. > Bye, > Tassilo >