From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: 51040@debbugs.gnu.org, larsi@gnus.org
Subject: bug#51040: No curved quotes in format-prompt and minibuffer-default-prompt-format
Date: Tue, 12 Oct 2021 19:31:48 +0300 [thread overview]
Message-ID: <83r1cqp5l7.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=G0-AzyhBS7Fa9FX0OWFmHMrVRevJDCmXCFxoz8bs9hg@mail.gmail.com> (message from Stefan Kangas on Tue, 12 Oct 2021 08:59:15 -0700)
> From: Stefan Kangas <stefan@marxist.se>
> 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.
next prev parent reply other threads:[~2021-10-12 16:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 16:40 bug#51040: No curved quotes in format-prompt and minibuffer-default-prompt-format Stefan Kangas
2021-10-05 16:44 ` Lars Ingebrigtsen
2021-10-05 17:11 ` Stefan Kangas
2021-10-06 8:58 ` Lars Ingebrigtsen
2021-10-11 20:58 ` Stefan Kangas
2021-10-12 12:03 ` Lars Ingebrigtsen
2021-10-12 12:36 ` Stefan Kangas
2021-10-12 14:17 ` Eli Zaretskii
2021-10-12 12:52 ` Eli Zaretskii
2021-10-12 15:59 ` Stefan Kangas
2021-10-12 16:31 ` Eli Zaretskii [this message]
2021-10-12 17:26 ` Stefan Kangas
2021-10-12 18:43 ` Eli Zaretskii
2021-10-12 23:21 ` Stefan Kangas
2021-10-13 12:07 ` Eli Zaretskii
2021-10-13 12:25 ` Stefan Kangas
2021-10-13 13:22 ` Eli Zaretskii
2022-09-10 5:30 ` Lars Ingebrigtsen
2021-10-12 23:44 ` Dmitry Gutov
2022-09-10 5:38 ` Lars Ingebrigtsen
2022-09-10 6:13 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r1cqp5l7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=51040@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).