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 22:46:17 +0200 Message-ID: <86bkujm7l2.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> <86a6a3zj4y.fsf@gnu.org> <87a6a3y3zu.fsf@gnus.org> <874k0bh2v4.fsf@gnu.org> <86tu8bxwrm.fsf@gnu.org> <87mte3wgq2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30355"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: Tassilo Horn , Lars Ingebrigtsen , help-gnu-emacs@gnu.org, Philip Kaludercic To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 23 22:47:33 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 1o4Tjh-0007mG-Mj for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 22:47:33 +0200 Original-Received: from localhost ([::1]:60900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4Tjg-0001Hq-9L for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Jun 2022 16:47:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Tiq-0001Hi-EA for help-gnu-emacs@gnu.org; Thu, 23 Jun 2022 16:46:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Tip-0007Jr-WF; Thu, 23 Jun 2022 16:46:40 -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=OxSjIN4ghrUCcLum6dvRWrmfm1UQw0KRamI9+ig1xhU=; b=KSHiENSxCfJjvxuHS206 3IBJoWUh0IRuV9sGrxPTxYECQZgz1wJPr9pGcZHKe6ZnbnbNgh1DuiXkE7ge7DCPshW961EQ0udFH VMFy2BriJ3iSWV/aBI0H6OKVHwKOu7n0XsAGynOCAnyW7nAYonRpot+riPzH1wALZ039Nrq/hDTEL DzPhp1w0MxD75aSu3B0ByoPLkJeSQYDzYAUekkQPjw9WY3nJ1ji9kvT4A9+9i08zE7YbLnxthHjuJ QhiO5i3J63cwEkJ2W0mtnSszzB2pSMnBpxD06LM/qXjSWuD+c9gwz9sSvjABRHWrgP8TItBrVb2fb 7B9iEFuSus/1cw==; Original-Received: from p4fe3ee56.dip0.t-ipconnect.de ([79.227.238.86]:55217 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Tip-0007d1-CA; Thu, 23 Jun 2022 16:46:39 -0400 In-Reply-To: <87mte3wgq2.fsf@gmail.com> (Robert Pluim's message of "Thu, 23 Jun 2022 17:18:45 +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:138036 Archived-At: Robert Pluim writes: >>>>>> On Thu, 23 Jun 2022 16:46:53 +0200, Arash Esbati said: > > Arash> I'd say it's up to the AUCTeX maintainers to bump the minimum required > Arash> Emacs version at a faster pace ;-) > > Either that, or they can depend on the 'compat' package, and then just > use emacs-28 features with wild abandon. Thanks for reminding me of compat. I think compat-28.el has currently a bug since the return value of `format-prompt' is not the same as in Emacs>=28: (format-prompt "Foo" "") => "Foo: " This is what compat-28.el does: (defun compat-format-prompt (prompt default &rest format-args) "Format PROMPT with DEFAULT. If FORMAT-ARGS is nil, PROMPT is used as a plain string. If FORMAT-ARGS is non-nil, PROMPT is used as a format control string, and FORMAT-ARGS are the arguments to be substituted into it. See `format' for details. If DEFAULT is a list, the first element is used as the default. If not, the element is used as is. If DEFAULT is nil or an empty string, no \"default value\" string is included in the return value." (concat (if (null format-args) prompt (apply #'format prompt format-args)) (and default (or (not (stringp default)) (not (null default))) ;; (length> default 0) ; This is in Emacs stock version (format " (default %s)" (if (consp default) (car default) default))) ": ")) (compat-format-prompt "Foo" "") => "Foo (default ): " compat doesn't check if DEFAULT is an empty string. I'm CC'ing Philip, maybe he can comment. Best, Arash