GNU bug report logs - #10578
warning about mismatch between compile and run-time PNG libraries

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Sun, 22 Jan 2012 16:08:02 UTC

Severity: minor

Tags: patch

Found in version 24.0.92

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

Bug is archived. No further changes may be made.

Full log


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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 10578 <at> debbugs.gnu.org
Subject: Re: bug#10578: 24.0.92; No png images on OpenSUSE 12.1
Date: Mon, 23 Jan 2012 02:11:42 +0100
On Sun, Jan 22, 2012 at 21:41, Eli Zaretskii <eliz <at> gnu.org> wrote:

> How about if you try doing that?

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

If we want to warn with the real message for image_error, either we
duplicate the Fformat call in add_to_log, which seems a waste, or we
add some function xdisp.c:add_to_log_and_warn. Alternatively,
repurposing add_to_log to also (optionally) warn wouldn't be
difficult, as it is used only nine times in the sources.

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.

    Juanma


=== modified file 'src/image.c'
--- src/image.c	2012-01-19 07:21:25 +0000
+++ src/image.c	2012-01-22 22:22:31 +0000
@@ -676,7 +676,14 @@
 static void
 image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2)
 {
+  Lisp_Object warning[3];
+
   add_to_log (format, arg1, arg2);
+  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);
 }




This bug report was last modified 9 years and 103 days ago.

Previous Next


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