Subject: bug#10578: 24.0.92; No png images on OpenSUSE 12.1

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 25 Jan 2012 20:31:15 +0100

Juanma Barranquero <[email-masked]> writes:

> The simplest way is just to warn with a fixed message, as in the
> attached patch.

I think that's a good approach.

> In any case, that kind of warning can be intrusive, because
> display-warning keeps displaying the *Warnings* buffer. For example,
> if I load libpng12 in a png14-compiled Emacs and visit a PNG file, I
> get a string of 9 warnings, and 3 more each time I try to advance the
> cursor. I think it wouldn't be much of a problem with image_error,
> because the errors are caused by displaying images, and as soon as you
> kill the corresponding buffer you're OK.

Perhaps it would be an idea to add a simple rate-limiting device?  That
is, don't output the "Look in the *Messages* buffer" more often than,
say, once per second.  Or minute.  Perhaps per ten seconds makes more
sense, so that the message isn't as easily lost, but makes it possible
to continue using Emacs.

[...]

> +  warning[0] = intern ("image");
> +  warning[1] = build_string ("Image error, please check *Messages*");
> +  warning[2] = intern (":error");
> +  Vdelayed_warnings_list = Fcons (Flist (3, warning),
> +                                  Vdelayed_warnings_list);

And perhaps just factor it out into its own function, and just say
"Display error, please check *Messages*", and then all redisplay code
that outputs error messages in this manner can use it to alert the user
about this?

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Sent from my Rome