From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Date: Thu, 27 Aug 2020 21:48:18 +0300 Organization: LINKOV.NET Message-ID: <878se0gc25.fsf@mail.linkov.net> References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.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="14809"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 27 20:59:13 2020 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 1kBN78-0003Yj-0l for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Aug 2020 20:59:10 +0200 Original-Received: from localhost ([::1]:40766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBN76-0004If-Mo for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Aug 2020 14:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBN70-0004IR-Cj for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2020 14:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBN70-0005Qa-3b for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2020 14:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kBN70-0000oH-1x for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2020 14:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Aug 2020 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12443 X-GNU-PR-Package: emacs Original-Received: via spool by 12443-submit@debbugs.gnu.org id=B12443.15985547233089 (code B ref 12443); Thu, 27 Aug 2020 18:59:02 +0000 Original-Received: (at 12443) by debbugs.gnu.org; 27 Aug 2020 18:58:43 +0000 Original-Received: from localhost ([127.0.0.1]:44028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBN6h-0000nl-F1 for submit@debbugs.gnu.org; Thu, 27 Aug 2020 14:58:43 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:65339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBN6f-0000nW-Hq for 12443@debbugs.gnu.org; Thu, 27 Aug 2020 14:58:42 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 2150340003; Thu, 27 Aug 2020 18:58:31 +0000 (UTC) In-Reply-To: <871rjt1uc1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 26 Aug 2020 14:10:22 +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:186558 Archived-At: > Anyway, I went ahead and pushed this to Emacs 28, Maybe the final separator (colon) should be customizable as well. What if someone wants to use the same character as used in shell, i.e. '$'. Then moving the currently hard-coded colon to the default value " (default %s): " will allow the users to customize it to " (default %s)$ " > but I've only converted two (2) of the (at least) couple hundreds of > callers, because I wanted to see if there were any further comments on > the concept (or the interface) before digging into the rest of the > call sites. Shouldn't one of these calls (namely 'describe-function') be further simplified with diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d302c05283..617f6ae5e8 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -151,9 +151,7 @@ describe-function (let* ((fn (function-called-at-point)) (enable-recursive-minibuffers t) (val (completing-read - (if fn - (format-prompt "Describe function" fn) - "Describe function: ") + (format-prompt "Describe function" fn) #'help--symbol-completion-table (lambda (f) (or (fboundp f) (get f 'function-documentation))) t nil nil But something is still wrong - with the nil default value the prompt becomes: "Describe function (default nil): " whereas it should be "Describe function: " It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' when 'default' is nil.