From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.bugs Subject: bug#56380: 29.0.50; completing-read: INITIAL-INPUT arg Date: Tue, 05 Jul 2022 14:49:58 +0200 Message-ID: <86edyzg1vt.fsf@gnu.org> References: <878rp9840g.fsf@web.de> <87v8sb4ww7.fsf@gnus.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="13794"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: Michael Heerdegen , Stefan Monnier , Drew Adams , 56380@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 05 14:51:10 2022 Return-path: Envelope-to: geb-bug-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 1o8i1G-0003Lo-H1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 14:51:10 +0200 Original-Received: from localhost ([::1]:49654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8i1F-0005yD-2k for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 08:51:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8i18-0005y3-W3 for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 08:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8i18-0004d5-NZ for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 08:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8i18-0003yE-EM for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 08:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arash Esbati Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jul 2022 12:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56380 X-GNU-PR-Package: emacs Original-Received: via spool by 56380-submit@debbugs.gnu.org id=B56380.165702543215197 (code B ref 56380); Tue, 05 Jul 2022 12:51:02 +0000 Original-Received: (at 56380) by debbugs.gnu.org; 5 Jul 2022 12:50:32 +0000 Original-Received: from localhost ([127.0.0.1]:49632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8i0d-0003x0-QD for submit@debbugs.gnu.org; Tue, 05 Jul 2022 08:50:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8i0c-0003wj-RK for 56380@debbugs.gnu.org; Tue, 05 Jul 2022 08:50:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8i0V-0004WU-Hi; Tue, 05 Jul 2022 08:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=yh1W/jS4vMTz6SJdvGgbA3gHxstoBzqihtLSYXwYNr4=; b=avZz7YQrQxrGWY84tWqq DhHZbp4EPN56egPcizR0l2ZmSTLx2UASu5rVdiL3lvAP0p31Hg03Ceyu3Mz9rt4IqAN/q+8Zzgrjc ZKltpSuJjDnelruXnmpdNqBdle03epBz5GLrCeLeBiCEgZGv6T0Q5ruezYiAtbzSYyazldO1vVoPx Y3OvU0v7BoZ5gnmu2rw+t2LJw5BBDGaGEVa+dFqgo76rQbhbziGL//BR1lM9YZn0VWkhX/cvb3JGx aN+I5qmw+cVgdxOq7zuC+pdjV7Q41jb0nBvPPyUhNowVNeLkrPGnKdYKP/RNh+yD0C47u8PEm42mD o42JgsM3qwDykA==; Original-Received: from p4fe3ee56.dip0.t-ipconnect.de ([79.227.238.86]:52504 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8i0G-00063v-4V; Tue, 05 Jul 2022 08:50:22 -0400 In-Reply-To: <87v8sb4ww7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 05 Jul 2022 13:33:12 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236110 Archived-At: Lars Ingebrigtsen writes: > Michael Heerdegen writes: > >> The docstring of `completing-read' says the argument INITIAL-INPUT is >> deprecated - yet there are over 30 nontrivial uses in Emacs' own Elisp >> sources. So, although we currently don't want that this argument is >> used just to insert a default input, it's sometimes not possible to >> avoid using it. > > [...] > >> + for POSITION.) Don't use this argument to insert a default value -- >> + use DEF for that. You can use INITIAL-INPUT, for example, to insert >> + a prefix common to all completion candidates. See >> + `minibuffer-with-setup-hook' for a general method to prepare the >> + minibuffer. > > It's an improvement on the original text, but this makes it sound like > inserting a common prefix is something callers are expected to do. (But > instead it's a super rare special case that virtually nobody would > actually do in practice.) So I'd rather just remove that sentence about > what you can use INITIAL-INPUT for. Or say that it should be used in rare cases like a common prefix or a cons cell for the history argument. The docstring would be then more in line with the reference manual (the common prefix part has be to be added to the reference manual, but that is doable.) https://www.gnu.org/software/emacs/manual/html_node/elisp/Initial-Input.html Best, Arash