GNU bug report logs - #40750
Use error face for errors

Previous Next

Package: emacs;

Reported by: ndame <ndame <at> protonmail.com>

Date: Tue, 21 Apr 2020 18:55:02 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 40750 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "40750 <at> debbugs.gnu.org" <40750 <at> debbugs.gnu.org>,
 Drew Adams <drew.adams <at> oracle.com>, ndame <ndame <at> protonmail.com>
Subject: Re: bug#40750: Use error face for errors
Date: Mon, 23 May 2022 13:55:12 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Of course, the error face should not just remove any faces that are
> already there; that precludes making e.g. keybindings stand out with the
> `help-key-binding' face.  So you would need to give the error-message
> face lower priority.

I started poking at this a bit, and I realised that I've never actually
seen an error message that has any kind of face.  And that's because
print_error_message uses princ on the strings we give error/signal, and
princ discards all text properties.

So there's nothing here to merge, really -- the strings, when they come
out of Ferror_message_string, are property-less.

I think.

And users can already alter the look of the error message by just using
command-error-function:

(setq command-error-function
      (lambda (data _ _)
	(message "%s" (propertize (error-message-string data)
				  'face 'error))))

So I don't think there's anything much here to implement, really, unless
we really want to start defaulting error messages to use a particular
face.  And I don't think we want that?

So I'm adding some more pointers to command-error-function from relevant
doc strings, because finding that variable wasn't trivial, and I'm
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.