all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 50785@debbugs.gnu.org
Subject: bug#50785: 28.0.50; error doesn't use help-key-binding face from substitute-command-keys
Date: Mon, 29 Aug 2022 10:32:45 -0700	[thread overview]
Message-ID: <CADwFkmmzKUBdDWz4q0NZ=+jha9Hh6uOS0QatL=iRB2fRFvTYYQ@mail.gmail.com> (raw)
In-Reply-To: <87o7w3m2ry.fsf@gnus.org>

Lars Ingebrigtsen <larsi@gnus.org> writes:

> The error message are output (by default) by print_error_message.  It
> simply does `princ' on the string with a PRINTCHARFUN of t, which is the
> minibuffer.  And if you do that, then you lose the text properties:
>
> (defun foo2 ()
>   (interactive)
>   (princ (substitute-command-keys "Use \\[next-line]") t))
>
> We probably don't want to change something as fundamental as that, so if
> we want to fix this, we have to change print_error_message to just call
> Fmessage instead, I guess?

That's the fix we've used on a Lisp level -- avoiding `princ' in favor
of `insert', etc.

Perhaps it would be nice with a `princ' that preserves text properties?





  reply	other threads:[~2022-08-29 17:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 18:33 bug#50785: 28.0.50; error doesn't use help-key-binding face from substitute-command-keys Stefan Kangas
2021-09-25  2:03 ` Lars Ingebrigtsen
2022-08-29 16:29   ` Lars Ingebrigtsen
2022-08-29 17:32     ` Stefan Kangas [this message]
2022-08-30 10:25       ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmmzKUBdDWz4q0NZ=+jha9Hh6uOS0QatL=iRB2fRFvTYYQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=50785@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.