From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Date: Tue, 25 Aug 2020 05:55:44 -0700 Message-ID: References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2561"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dani Moncayo , Stefan Monnier , 12443@debbugs.gnu.org To: Lars Ingebrigtsen , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 14:56:10 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 1kAYUi-0000VL-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 14:56:08 +0200 Original-Received: from localhost ([::1]:55420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAYUh-0007oS-EK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 08:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAYUc-0007oG-7K for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAYUb-0000oj-V3 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAYUb-0002Df-SY for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 08:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Aug 2020 12:56:01 +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.15983601538506 (code B ref 12443); Tue, 25 Aug 2020 12:56:01 +0000 Original-Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 12:55:53 +0000 Original-Received: from localhost ([127.0.0.1]:60679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYUS-0002D8-Iu for submit@debbugs.gnu.org; Tue, 25 Aug 2020 08:55:52 -0400 Original-Received: from mail-yb1-f196.google.com ([209.85.219.196]:35491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYUR-0002Cr-3b for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 08:55:51 -0400 Original-Received: by mail-yb1-f196.google.com with SMTP id y134so7096838yby.2 for <12443@debbugs.gnu.org>; Tue, 25 Aug 2020 05:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=Mp9s8H2Ol4wpZR45Ken+2i3r7hqHc9ePj/C7QbzQkzo=; b=JXajpThgBy8exYDuCBYh8TZTpB2EJh73x/txLCIJd+cOiDO/rFXSgq9eMomfNdMm4k gBF2HKLgOGC+C4zrrdYV0F9Nu8/NoBiv180X3a8ZiD4cnhw6nlk7dG7Y1M92KoqCqTwO vALMTE1OCihbU/ialKr34TiolX75qaoHCD64JHbV3rInnL8ezgut5aA4eXX4HBaAR95E wRMOYbLK6gG1aaO6BgI8jD8ZehLjzFGZ8crvbEQNTynlg17zZ4eClbotkqyOAVzW/EJG dpn+n4i1w3AVBXQGLodwILLzcSKeTCH22pEROxWk3mqWAgwP3Vco91YFBTnhYgTXFnk1 9nKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Mp9s8H2Ol4wpZR45Ken+2i3r7hqHc9ePj/C7QbzQkzo=; b=lE51CWi8H9cy8CMRkkaOYiO2pWcf/b5EM+GJ9wk0D0yHYq8mll74dAa6G0CQrBWTu+ BlMEsGyyk/d2UlARzRIQmfujXxs7STJbBEY19Un1JOoaIG1BkxUcOdyCeY0JGshANLPg mR0S4dXtjZN9byb++87zIHs7mPfthfKPC1CBGhJ1Ekj4QPNIxk1aOX7bnHhJ4NhzmE1p 5P7zx/3BGMr3xJU0kBWX7mdR9NwB5G3evcYkayH7nvWsJTlRI9A0HoD1D308PsjsaHS/ SUyBQekYqvG55awjQbvUkEY27hAx+ISZJIiMBls+NfevotiNTY6inc6pAtTlI+8F4dZ9 56Mw== X-Gm-Message-State: AOAM532pArkwQUYAOIa9nnx0EjW968rOaHkeL/LFLpLoiQ9uiH4Axsq7 aZ58oy1nVVaEUutr1dH6vH96UtrWiqQCHYzC9VA= X-Google-Smtp-Source: ABdhPJyB1LAhnGou7p5olWhrRtuJsw3/AdLfDUHGIUDlshsPjgUil7v9LZTfzZFwZLKBHdxbN0UwoAQxHsGd80xuwTw= X-Received: by 2002:a25:4ed7:: with SMTP id c206mr14768255ybb.129.1598360145477; Tue, 25 Aug 2020 05:55:45 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Aug 2020 05:55:44 -0700 In-Reply-To: <878se2aox0.fsf@gnus.org> 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:186275 Archived-At: Lars Ingebrigtsen writes: > Juri Linkov writes: > >> (defcustom minibuffer-default-prompt-format " (default %s)" >> "Default format." >> :type 'string) >> >> Example of usage: >> >> (let ((default "def")) >> (read-from-minibuffer >> (format "Set bookmark%s: " >> (format minibuffer-default-prompt-format default)))) >> >> Other possible values: >> >> (setq minibuffer-default-prompt-format " [%s]") >> (setq minibuffer-default-prompt-format "") > > I think that makes a lot of sense. Does anybody have an opinion here? I think this sounds like a good idea; consistency is good. How about taking it even further? Something along the lines of: (format-prompt PROMPT &optional DEFAULT) (format-prompt "Set bookmark" default) => "Set bookmark [foobar]: " (format-prompt "Goto char") => "Goto char: " (This would avoid having to always remember to use double formats like above.)