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: [External] : Re: completing-read depricated initial-input Date: Thu, 23 Jun 2022 21:56:39 +0200 Message-ID: <878rpn876c.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13676"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.28; emacs 29.0.50 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 Thu Jun 23 22:19:23 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 1o4TIQ-0003Oq-H0 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 22:19:22 +0200 Original-Received: from localhost ([::1]:46446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4TIP-0006ML-3v for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 16:19:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4TI2-0006M8-15 for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 16:18:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4THz-00036B-Tn; Thu, 23 Jun 2022 16:18:55 -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=fDrm1eabrZ4pDrxWidkGziqZLyAYUPDm16bgtc3ovQs=; b=FGPvxpFKPi2MUF yxKSsRXDomK9mX7hEPOlJyBD5EYDLj5NT9KHPdH1T6TwBaCT8haTxKiLuqgti/I4HtOtZMv3G93E1 tTdLXl27JzJjYr/tO/8d3Mdy6dlXNuoeAgYVCEST78AHLJk90SW9FE1lnm6n+qb/9tJ1akx0BbAzR HcDyO17MzOuYUAJy7SmSuz+vzYjmtEsbX4A2Rk2nqoPN7djmao4GnLb57HCmoSegiosRsRHpqGYEy Gg3VAcbDmgewPTpiQBH6TA5KgU3zopJc5P5cAk+rOrsJMU38Lze17UDtI8mcD5vaEZS95fuQzaRts L4zGmiSkZLIw844+8UVA==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:37499) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4THz-0000Iv-Mh; Thu, 23 Jun 2022 16:18:55 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 6C65027C005B; Thu, 23 Jun 2022 16:18:55 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 23 Jun 2022 16:18:55 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefjedgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epudejtdehuddvleffjeekteegvdehleehvdeufefhueekkeekhedvgfeggeffvefgnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jun 2022 16:18:53 -0400 (EDT) In-reply-to: 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:138035 Archived-At: 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. 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. ;-) Bye, Tassilo