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#51040: No curved quotes in format-prompt and minibuffer-default-prompt-format Date: Tue, 5 Oct 2021 13:11:33 -0400 Message-ID: References: <87o883776l.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="28238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51040@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 05 20:31:14 2021 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 1mXpDd-0007AV-Rs for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 20:31:13 +0200 Original-Received: from localhost ([::1]:36430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXpDc-0001LY-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 14:31:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXnz3-0007Uc-G6 for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 13:12:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXnz0-0004en-Ds for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 13:12:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXnz0-0004sQ-8q for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 13:12:02 -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, 05 Oct 2021 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51040 X-GNU-PR-Package: emacs Original-Received: via spool by 51040-submit@debbugs.gnu.org id=B51040.163345390318715 (code B ref 51040); Tue, 05 Oct 2021 17:12:02 +0000 Original-Received: (at 51040) by debbugs.gnu.org; 5 Oct 2021 17:11:43 +0000 Original-Received: from localhost ([127.0.0.1]:41818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXnyh-0004rn-HJ for submit@debbugs.gnu.org; Tue, 05 Oct 2021 13:11:43 -0400 Original-Received: from mail-pf1-f173.google.com ([209.85.210.173]:35545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXnyd-0004rW-Ue for 51040@debbugs.gnu.org; Tue, 05 Oct 2021 13:11:41 -0400 Original-Received: by mail-pf1-f173.google.com with SMTP id c29so116026pfp.2 for <51040@debbugs.gnu.org>; Tue, 05 Oct 2021 10:11:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Aa4GgXiQ92PN9kiHRSjZPmi0TTL4mREIxHxDTVncBw0=; b=JavTt5sctakrgOzIEibDUC2LEdnQJZ3vc3s4OThHwnSfeVJ0Xu/58Irar2TpVCZIsn 3aN+xsI3FrRWbtiL/O1CKswqf8zy8Y9kx6dSrsLHi8axqPe8sdbpBa1hW//ciBV3KKdb SKZDlkHlmmpynCXFPchiaIzwXSpUrr4D7phdtUM2tSZtjOYtVQ84amGANvoNtFqkA5Gj YGha/NVvLool27+nK0pPJJtmM60Z9LdzHnzk1c9NrFJLAJ3yJLy5sy3FB4C4lpTyysH/ +D6v7ozc+ckBjU32oUFo/2CK6uauFlpChhOW/ke2/DrE8BLfGiKuO6FAnAi7/iDeDoci ouZQ== X-Gm-Message-State: AOAM530IkfkjkDZ2wgd+pjcDqaFXlrvE+gLak5xDWRg2oLSNgb5ZyuCm DqAVxhItHpUcUxXF3DwWXXeu8sjJH26dWvguYJk= X-Google-Smtp-Source: ABdhPJxkzdRWr0sgdAanujZOgaDQPFMVIQPzuDoHsZt2ROB7qDMifl4+PkVLtn0KusuyY4ps/Zhry3rMmhVaLrplxyE= X-Received: by 2002:a63:6941:: with SMTP id e62mr16572299pgc.114.1633453893907; Tue, 05 Oct 2021 10:11:33 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Oct 2021 13:11:33 -0400 In-Reply-To: <87o883776l.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:216488 Archived-At: Lars Ingebrigtsen writes: > Perhaps refactor out the curved quote stuff from > `substitute-command-keys' into its own function and then use that? > (Note: I haven't actually looked at that function.) I've been thinking about doing that for a while and I keep going back and forth. First, it's a bit tricky to factor this stuff out from `substitute-command-keys'. I have a rewrite of that function in the works (that I should probably finish up at some point), but even then it is not exactly obvious that this would be super easy and obvious to factor out in a good way. So if we do this, I think we should just bite the bullet and duplicate this functionality in a new function. It should just be a simple search+replace, so the duplication shouldn't be too bad. In some cases, we don't have command substitutions, so it would be nicer to be able to say `use-fancy-quotes' if that's what we want. On the other hand, besides the name there is also no immediate drawback to run `substitute-command-keys'. It is kind of nice to know that if we ever expand to have input with command substitution, it will just work. For example, what if a prompt wants to say something like (format-prompt "You pressed \\[foo-bar], now input ...") On the other hand, there are some places where we obviously will never want to run a "full" `substitute-command-keys', for example I think we have some places where we awkwardly say (substitute-command-keys "'").