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.help Subject: Re: completing-read depricated initial-input Date: Thu, 23 Jun 2022 14:12:45 +0200 Message-ID: <865ykrzigy.fsf@gnu.org> References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <86mte3lsj2.fsf_-_@gnu.org> <871qvfoce1.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17041"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: Drew Adams , Christopher Dimech , "eliz@gnu.org" , "monnier@iro.umontreal.ca" , Help Gnu Emacs , "carlmarcos@tutanota.com" To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 14:26:38 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 1o4Luw-0004IO-Bs for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 14:26:38 +0200 Original-Received: from localhost ([::1]:46974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4Lut-00037Y-9q for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 08:26:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LiA-0004jO-9r for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 08:13:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Li9-00008q-0e; Thu, 23 Jun 2022 08:13:25 -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:References:Subject:To: From; bh=stj20VxBuG/ec97i8N1YwmPCF99ZUVLsBQ3WrGkF+Gw=; b=j8CoOvr6DZxm7zstlw38 tK1Suh5eBBpQvQU4i6FZs3SRyY76htHpdvqo7QKua/1LGfqOF2dPQ8WhL26IGzdQOTH8Ef4NGESva BHwIPhGMPT1w9L+5z2a54yadj44zyjFJabxdSUPIpNlRIy8BlZ+5kzuc9Umf0Bx+ZXMqv945CQrLL UjJVWelN+MwnH0w9ErRIx9+yW69y90jY0lqGczbvdLMJwn5mAf8as3xEa1jZDxFOIxbVzXULdonPp DtXDAmS2xGa1rnZTngL1i9gByhN+9S2OXNno0BWdbiM6rkeAVlPWYEJ8P26MoYgY7eLxrCI6kG8c3 HT/V3oVoe++Btw==; Original-Received: from p4fe3ee56.dip0.t-ipconnect.de ([79.227.238.86]:64710 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Li7-0005Tx-J7; Thu, 23 Jun 2022 08:13:24 -0400 In-Reply-To: <871qvfoce1.fsf@web.de> (Michael Heerdegen's message of "Thu, 23 Jun 2022 13:19:34 +0200") 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:138016 Archived-At: Michael Heerdegen writes: > The purpose of `completing-read' is a bit different from `read-string' > and `read-from-minibuffer'. Providing INITIAL-INPUT is useful for the > latter, but much less for `completing-read' in my opinion. If at all > (anybody who has a believable real-life example?). If you have a common prefix which should be shown in the candidates list, in (La)TeX for instance: (let ((list '("iffalse" "iftrue" "else" "fi"))) (completing-read "Macro: " (mapcar (lambda (x) (concat "\\" x)) list) nil nil "\\")) Something like this looks odd: (let ((list '("iffalse" "iftrue" "else" "fi"))) (completing-read "Macro: \\" list)) Best, Arash