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: [External] : Re: completing-read depricated initial-input Date: Fri, 24 Jun 2022 13:23:57 +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> <878rpn876c.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="16951"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Drew Adams , 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 Fri Jun 24 13:24:35 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 1o4hQQ-00044t-TM for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 13:24:34 +0200 Original-Received: from localhost ([::1]:46610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4hQP-0006lJ-C3 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 07:24:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4hPv-0006l6-9D for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 07:24:03 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:34300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4hPt-0004YX-2z; Fri, 24 Jun 2022 07:24:02 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 6BC53FBB377; Fri, 24 Jun 2022 11:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1656069837; 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=o5lGYcHxAB5yLH+i/Jf0KaelGafAbmM08q4Ng5tFCoM=; b=Su/GPoWzryfB+MUa80Kvqcvey1FxfICQhlCryNnUYRiJV/OUCqZNWUfiO+eE/SVj wH9OxW3D9EizcU/7SK1OVmMHNebX6v8BNXbCG1cP4J5CLK7l5jWhDUkb3TQdGJ3Emew WE3wrqNlP8vampcZIBGaqBvWeKCZ9s7Q0AQPJHjRegqBoAr/f6pme45ROK3ks9X4QTN cVGoZCpIwceEj5P/Zb9+VVqeowuJuyV7Gtv8as8e5u8Ep54lWBo4Hc1tll6DQ4LgtL0 yrmfcdXfoUeNZVC3vR4ja4If9HoMtzTAxnTyHbSWfKFASALjEkwtNKU972W1LLalvr2 C598zGegXA== In-Reply-To: <878rpn876c.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:138068 Archived-At: Jun 23, 2022, 19:56 by tsdh@gnu.org: > Drew Adams writes: > >>> You have to delete the initial input if it's not what >>> you want or if you want to see the other possibilities. >>> >> >> That's akin to the arguments pro/con `delete-selection-mode'. >> > > No, not really. It is easy for every user to enable or disable > delete-selection-mode. That's not true for initial-input. If the > programmer used it, you get it, and there's no easy way to disable it. > >>> So basically all occurrences >>> >> >> "Basically"? or "all"? Do you mean not all >> but most/generally? Or do you mean all, so >> not just basically? >> >> I guess you mean almost all, aka _not_ all. >> > > Yes, I've meant that I cannot think of a situation where initial-input > used as a default value is suitable and even in non-default-value > scenarios I was able to come up with only two sensible use-cases. And > honestly, only the completing-read-multiple case is really convincing to > me. > >>> where INITIAL-INPUT is used as a kind of default >>> value are better handled with the DEF argument. >>> >> >> Sounds a bit circular. That just says that DEF >> is a better default-value behavior. Initial >> input isn't the same as a default value. The >> behavior/effect is different. >> > > Yes. What I've meant to say is that in the past, initial-input was > frequently used as a means to insert a default value, maybe because it > was available earlier. I don't know exactly, I'm an emacs newby using > it only since 2001. > That would be a mistake on their part.=C2=A0 Please refrain using the 20 ye= ar=20 card to thumb down others simply to push towards some direction.=C2=A0=20 > And since it comes first in the completing-read argument list and > INITIAL-INPUT is more in the face than DEF, chances are that people read > it first, it looks suitable, and so it is used for the default value > case. > >>> The only places where I can see it's useful is when all possible >>> completions have a common prefix and that is given as initial-input >>> (but then you only save one TAB) or with completing-read-multiple >>> when it's highly likely that the user wants to use the defaults given >>> as initial-input and just insert some more. >>> (completing-read-multiple doesn't explicitly state that INITIAL-INPUT >>> is deprecated.) >>> >> >> The behavior of INITIAL-INPUT differs from that >> of DEF. That's enough to point to different uses. >> >> Unless, that is, you can convince all that the >> DEF behavior is always preferable - for all users, >> all calls to `completing-read', and all contexts. >> > > I can only say that except for the crm case I cannot come up with a good > example where it's useful. But if you know some, I'm eager to read > them. > > And in any case: there's no need to have flamewars about some argument > being called deprecated. It's one of the central functions in emacs, > the argument is in the middle of the argument list. There's no doubt it > will still be there in 20 years. ;-) > If emacs discourages things, people will take it seriously.=C2=A0 A depreca= ted statement has consequences to many people in the way they code.=C2=A0 I= t is assumed that the=C2=A0 functionality is not to be relied upon too much= . It becomes a flame war when people start insisting on discouraging things t= hat do not constitute a problem.=C2=A0 There is nothing inherently wrong wi= th it.=C2=A0=20