GNU bug report logs -
#50785
28.0.50; error doesn't use help-key-binding face from substitute-command-keys
Previous Next
To reply to this bug, email your comments to 50785 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50785
; Package
emacs
.
(Fri, 24 Sep 2021 18:34:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Kangas <stefan <at> marxist.se>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 24 Sep 2021 18:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: minor
In "emacs -Q", if I use the following function:
(defun foo ()
(interactive)
(error (substitute-command-keys "Use \\[next-line]")))
The error message says "Use C-n", but "C-n" is not displayed with the
`help-key-binding' face.
In contrast, `message' does not have this problem:
(defun foo2 ()
(interactive)
(message (substitute-command-keys "Use \\[next-line]")))
Here, "C-n" is displayed with the correct face.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50785
; Package
emacs
.
(Sat, 25 Sep 2021 02:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 50785 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> In "emacs -Q", if I use the following function:
>
> (defun foo ()
> (interactive)
> (error (substitute-command-keys "Use \\[next-line]")))
>
> The error message says "Use C-n", but "C-n" is not displayed with the
> `help-key-binding' face.
Hm... is `error' stripping text properties before displaying, by any
chance? If so, is there any particular reason why that would make sense
in general? Hm... perhaps the idea is that `error' is used in
low-level circumstances, so we don't want to rely on faces etc actually
working?
Anybody know?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50785
; Package
emacs
.
(Mon, 29 Aug 2022 16:30:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 50785 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Hm... is `error' stripping text properties before displaying, by any
> chance? If so, is there any particular reason why that would make sense
> in general? Hm... perhaps the idea is that `error' is used in
> low-level circumstances, so we don't want to rely on faces etc actually
> working?
>
> Anybody know?
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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50785
; Package
emacs
.
(Mon, 29 Aug 2022 17:33:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 50785 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50785
; Package
emacs
.
(Tue, 30 Aug 2022 10:26:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 50785 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> Perhaps it would be nice with a `princ' that preserves text properties?
Hm, yes -- I guess adding a `print-*' variable for that would make
sense.
This bug report was last modified 2 years and 292 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.