From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.devel Subject: Re: Doc of deprecated INITIAL-INPUT arg of completing-read Date: Tue, 13 Feb 2024 17:07:25 +0000 Organization: https://www.tim-landscheidt.de/ Message-ID: <87le7owawi.fsf@vagabond.tim-landscheidt.de> References: <87v8smt9lp.fsf@web.de> <87h6ic1l23.fsf@vagabond.tim-landscheidt.de> 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="35616"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) Cc: Michael Heerdegen , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 13 18:08:17 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rZwGW-00092R-QM for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Feb 2024 18:08:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZwFx-0002bo-39; Tue, 13 Feb 2024 12:07:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZwFu-0002bJ-8u for emacs-devel@gnu.org; Tue, 13 Feb 2024 12:07:38 -0500 Original-Received: from gavdos.tim-landscheidt.de ([2a01:4f8:1c0c:4bd6::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZwFp-0003XP-Uh for emacs-devel@gnu.org; Tue, 13 Feb 2024 12:07:38 -0500 Original-Received: from port-62-145-29-194.static.as20676.net ([62.145.29.194]:39578 helo=vagabond) by gavdos.tim-landscheidt.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rZwFi-00CssM-1O; Tue, 13 Feb 2024 17:07:27 +0000 In-Reply-To: (Stefan Monnier's message of "Tue, 13 Feb 2024 09:59:24 -0500") Received-SPF: pass client-ip=2a01:4f8:1c0c:4bd6::1; envelope-from=tim@tim-landscheidt.de; helo=gavdos.tim-landscheidt.de X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316178 Archived-At: Stefan Monnier wrote: >> In Gnus, I want to set a group parameter ("to-list") when I >> encounter an article in a Gmane group if that article has an >> "List-Post" header. In most cases, I want to set the para- >> meter to the header's value. Sometimes the header's value >> is "encrypted" in which case I want to set it to another >> value (which I researched out-of-prompt). > That's a very usual use-case. > That should use > (read-string (format-prompt "to-list value (default %s): " > default) > nil nil default) > And if you're perplexed by the complexity of this code compared to the > one you proposed, I totally agree: we should rework our API so that The > Right Way=E2=84=A2 is also the easiest way. I'm not perplexed :-). What I find confusing is: a) The solution for this "very usual" use case is not men- tioned anywhere in the documentation. Instead, the doc- string (for completing-read) suggests a different work- flow. b) With this solution, if the user needs to change the de- fault/initial value, he has to use one more keystroke (M-n) than if INITIAL-INPUT had been used. The only ar- gument given in the documentation for requiring that ad- ditional keystroke is "initial input is an intrusive in- terface" (RMS in 70c750c0e8e54947399245af6c8b49f908c8939c). I have no idea what an "intrusive interface" is, and why INITIAL-INPUT is, but the solution above is not. Tim