From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51040: No curved quotes in format-prompt and minibuffer-default-prompt-format Date: Tue, 12 Oct 2021 19:31:48 +0300 Message-ID: <83r1cqp5l7.fsf@gnu.org> References: <87o883776l.fsf@gnus.org> <87fstefs2u.fsf@gnus.org> <83lf2yquan.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7914"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51040@debbugs.gnu.org, larsi@gnus.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 18:49:45 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 1maKyG-0001sI-3B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 18:49:44 +0200 Original-Received: from localhost ([::1]:55754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKyE-0000jG-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 12:49:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKi6-0000n2-Nk for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maKi6-0000Fs-Ex for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maKi6-0004Bu-CA for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51040 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51040-submit@debbugs.gnu.org id=B51040.163405632315898 (code B ref 51040); Tue, 12 Oct 2021 16:33:02 +0000 Original-Received: (at 51040) by debbugs.gnu.org; 12 Oct 2021 16:32:03 +0000 Original-Received: from localhost ([127.0.0.1]:50936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maKh9-00048M-DV for submit@debbugs.gnu.org; Tue, 12 Oct 2021 12:32:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maKh8-00047o-4U for 51040@debbugs.gnu.org; Tue, 12 Oct 2021 12:32:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47862) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maKh2-0007xT-LJ; Tue, 12 Oct 2021 12:31:56 -0400 Original-Received: from [87.69.77.57] (port=4926 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maKh2-0007It-81; Tue, 12 Oct 2021 12:31:56 -0400 In-Reply-To: (message from Stefan Kangas on Tue, 12 Oct 2021 08:59:15 -0700) 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:217057 Archived-At: > From: Stefan Kangas > Date: Tue, 12 Oct 2021 08:59:15 -0700 > Cc: larsi@gnus.org, 51040@debbugs.gnu.org > > > Also, this seems to ignore the nil value of text-quoting-style? > > The reason is that `text-quoting-style' (the function) handles this > already, and will never return nil. (This is arguably a bit confusing, > but it is what it is.) That's worth a comment, IMO. (And why do you use the function and not the variable, btw?) > > And finally, I think the doc string of text-quoting-style should be > > amended, since it says that variable's effect is limited to help text > > and format-message, but now it seems its effect will spread much > > wider. > > Hmm, in what sense will it spread wider? In the sense that any caller of substitute-quotes will introduce this into any text that is constructed from the results. > I think this will still be limited to help and messages? There's no way for us to limit the domain of its usage, in practice. > IOW, I'm happy to add something, but I'm not sure what that would > be. It should at least say that any callers of the new function will be affected by text-quoting-style. > >> * lisp/minibuffer.el (format-prompt): Use substitute-command-keys. > >> (Bug#51040) > > > > I'm not sure I understand the rationale for this. This will change > > the appearance of formatted prompts, won't it? So people will now > > have to use \\=' to get a literal apostrophe? is that really what we > > want, and if so, why? > > The reason for the change is that we want curved quotes for all the > usual reasons We do? Who is "we" here? I sense another heated argument about this issue, which was a hard sell even in the help and error messages. My take from that argument is that "we" want to limit these conversions to as few contexts as possible, to keep the community at peace, if for no other reason. > and it might be useful to allow command substitutions as well, in > case a prompt wants to show a keybinding. But the change forces this on anyone who uses format-prompt, doesn't it? And we are now advertising format-prompt as THE canonical way of producing prompts, don't we? And we are proactively converting code that issues prompts to use format-prompt, don't we? So soon enough every prompt will be forced to undergo these substitutions, whether it wants or not. Even worse, commands that don't use format-prompt will produce prompts that look differently from those which do. Right? IOW, I'd be okay with an opt-in feature that would perform such substitutions, if the Lisp program wants that. But why enforce that? > format-prompt is new in Emacs 28.1, so I guess we're deciding its > semantics now. I'm sorry, but to me this looks like a salami tactics, not a rational decision-making process. We decide that it would be nice to have format-prompt that replaces boilerplate code, so far so good. Then we start adding features to it that have nothing to do with boilerplate, they change the behavior in significant ways. IOW, the semantics are the side effect of adding more and more features without any discussion of the roadmap or the goal which we want to achieve. > That may or may not be strong enough reason to push this change to > emacs-28 instead of master. Not if this becomes now the canon of prompting the user, it isn't. > +@defun substitute-quotes > +This function works like @code{substitute-command-keys}, but only > +replaces quote characters. The argument is missing, and is not mentioned in the description. Also, you need "@end defun" to end it. Thanks.