unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: "40750@debbugs.gnu.org" <40750@debbugs.gnu.org>,
	Drew Adams <drew.adams@oracle.com>, ndame <ndame@protonmail.com>
Subject: bug#40750: Use error face for errors
Date: Mon, 23 May 2022 13:55:12 +0200	[thread overview]
Message-ID: <87o7zompjz.fsf_-_@gnus.org> (raw)
In-Reply-To: <CADwFkmmFd20y9qCuq=7iRxEnRhYj2E5sMhK2vypJjcLnBkGzwA@mail.gmail.com> (Stefan Kangas's message of "Sat, 25 Sep 2021 09:59:17 -0700")

Stefan Kangas <stefan@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





  reply	other threads:[~2022-05-23 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 18:54 bug#40750: Use error face for errors ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-21 16:06 ` Lars Ingebrigtsen
2021-01-21 17:35   ` Basil L. Contovounesios
2021-01-21 17:38     ` Lars Ingebrigtsen
2021-09-25  2:41   ` Stefan Kangas
2021-09-25  2:42     ` Lars Ingebrigtsen
2021-09-25 15:46       ` bug#40750: [External] : " Drew Adams
2021-09-25 16:59         ` Stefan Kangas
2022-05-23 11:55           ` Lars Ingebrigtsen [this message]
2021-11-02  6:31 ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87o7zompjz.fsf_-_@gnus.org \
    --to=larsi@gnus.org \
    --cc=40750@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=ndame@protonmail.com \
    --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).