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 13:58:21 +0200 Message-ID: <86a6a3zj4y.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> <87zgi3itb7.fsf@dataswamp.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="27707"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 14:05:04 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 1o4La4-00070w-ME for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 14:05:04 +0200 Original-Received: from localhost ([::1]:57106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4La3-0006H6-73 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 08:05:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LU1-0003e3-I9 for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 07:58:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LU1-0005Ts-9e for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 07:58:49 -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=wBC0h/5BkDWJg6GdaXLPv7lpD4xYMFJE0oBYWOAR1qo=; b=ZNZCYL1u6g8ac3R2orPR QhxQT9LMpw55KocGTeIbb+ODm2x8lD5Kfc/RPGVJ7JnhRJPSwhYa0bvoprP37V8kQuCdR8CRXzw63 Xfy+Dvf0enpEAXM3GT+FaqqgqsmU13IfQjGrhpCEOG5WGsNf8s1SWnSG5IO7X+k2UuOCMpqTmkyTs rryNbkziXAGdUuf01SW7yvj4fCaH4bF0+75CN5aeHyZ4TV3o5RXtbWfta1yF9qzyyobDi7DdYoLTT duIjGgl7dzjnBTiWuz1w4lHMgDMAWqmyKT1X/v54+iMGcGfqA1zQs6uQ84eE6SKR3JbLz/yF9+cts X0OGI8gi+O6TpA==; Original-Received: from p4fe3ee56.dip0.t-ipconnect.de ([79.227.238.86]:64620 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4LU0-0001xc-Rl for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 07:58:49 -0400 In-Reply-To: <87zgi3itb7.fsf@dataswamp.org> (Emanuel Berg's message of "Thu, 23 Jun 2022 12:10:36 +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:138014 Archived-At: Emanuel Berg writes: > Tassilo Horn wrote: > >> You have to delete the initial input if it's not what you >> want or if you want to see the other possibilities. >> So basically all occurrences where INITIAL-INPUT is used as >> a kind of default value are better handled with the >> DEF argument. > > I know but ... why are you telling me this? Because you asked? I parsed your question exactly the same way Tassilo did. > IMO this is the best way of doing it: > > (let ((name "Danger")) > (read-string (format "name: [%s] " name) nil nil name) ) I think the current standard in Emacs is like this: (let ((name "Danger")) (read-string (format "Name (default %s): " name) nil nil name)) Best, Arash