From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#10578: 24.0.92; No png images on OpenSUSE 12.1 Date: Thu, 26 Jan 2012 18:22:21 +0100 Message-ID: References: <87y5sz1ztp.fsf@linux-hvfx.site> <83k44j3djg.fsf@gnu.org> <83ipk339sj.fsf@gnu.org> <83hazn38tp.fsf@gnu.org> <83fwf731y8.fsf@gnu.org> <87y5svinp8.fsf@gnus.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327598701 19252 80.91.229.12 (26 Jan 2012 17:25:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Jan 2012 17:25:01 +0000 (UTC) Cc: larsi@gnus.org, 10578@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 26 18:24:57 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RqT4C-0007bw-Bd for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jan 2012 18:24:56 +0100 Original-Received: from localhost ([::1]:51034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqT4A-0007nD-Qi for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Jan 2012 12:24:54 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqT31-0004zz-LY for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2012 12:23:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqT2t-0003Sy-Mh for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2012 12:23:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqT2t-0003SO-GX for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2012 12:23:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RqT3J-00011P-Px for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2012 12:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2012 17:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10578-submit@debbugs.gnu.org id=B10578.13275986253906 (code B ref 10578); Thu, 26 Jan 2012 17:24:01 +0000 Original-Received: (at 10578) by debbugs.gnu.org; 26 Jan 2012 17:23:45 +0000 Original-Received: from localhost ([127.0.0.1]:45760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqT32-00010v-7N for submit@debbugs.gnu.org; Thu, 26 Jan 2012 12:23:45 -0500 Original-Received: from mail-pw0-f44.google.com ([209.85.160.44]:54215) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RqT2y-00010Y-2f for 10578@debbugs.gnu.org; Thu, 26 Jan 2012 12:23:41 -0500 Original-Received: by pbdu7 with SMTP id u7so362966pbd.3 for <10578@debbugs.gnu.org>; Thu, 26 Jan 2012 09:23:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=ur8zTQh384Fu3ybmcukBRRofa5FpR+cUl6Y9SF0kNs4=; b=hrc1OFjyGaHIsBJs6cwTb+syjj+fKZeToS+0l0mTUvUxuCh8MaPkGQQ0erYU2DaOTX fRyiNiOiDZDwEQszsU+yQgqgCHMClc59TE5yc2cXfcc9tkZzV56FkQr1tAmIZz8f0psk 4wfLfq8F4scKD1Bb5fPT+AZSrkPmiXxEg6fpQ= Original-Received: by 10.68.75.135 with SMTP id c7mr6672101pbw.43.1327598581238; Thu, 26 Jan 2012 09:23:01 -0800 (PST) Original-Received: by 10.143.37.9 with HTTP; Thu, 26 Jan 2012 09:22:21 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56043 Archived-At: On Thu, Jan 26, 2012 at 14:45, Eli Zaretskii wrote: > To tell the truth, I don't like such vague warning, since the > reference to *Messages* is not specific enough to be useful, IMO. =C2=A0I= t > is better to show some more specific text in the delayed warning > itself. OK, next iteration. The following patch shows all display warnings (errors, in fact), after 5 seconds of idle time. It's quite simple because I've assumed every call to add_to_log() wants to warn, the TYPE (in warnings.el terminology) is always `display', and the LEVEL is `:error'. If not all such calls should warn, or the LEVEL should sometimes be other than :error, the change is simple (just add a couple args to add_to_log), though someone will have to decide what to do in each current instance (as I said, it's not hard, as there are only nine or so). As for the TYPE, it's easy to change it in each case, but then filtering gets a bit more complex for little gain. =C2=A0 =C2=A0 Juanma =3D=3D=3D modified file 'lisp/subr.el' --- lisp/subr.el 2012-01-23 02:10:36 +0000 +++ lisp/subr.el 2012-01-26 17:00:50 +0000 @@ -1879,7 +1879,37 @@ (push warning collapsed))) (setq delayed-warnings-list (nreverse collapsed)))) +(defconst display-errors-idle-time 5.0 + "Interval of idle time before warning about display errors.") + +(defvar display-errors-pending nil + "Internal use only.") + +(defun show-display-errors-when-idle () + "Warn about display errors when Emacs is idle. +Only the most recent error (possibly collapsed) is shown, +after `display-errors-idle-time' seconds of idle time; +the rest are assumed to be identical and discarded. +Used from `delayed-warnings-hook' (which see)." + (let ((errors nil) + (pending display-errors-pending)) + (dolist (warning delayed-warnings-list) + (when (eq (car warning) 'display) + (push warning errors))) + (when errors + (setq delayed-warnings-list (assq-delete-all 'display + delayed-warnings-list)) + (setq display-errors-pending (nconc display-errors-pending errors)) + (unless pending + (run-with-idle-timer display-errors-idle-time nil + (lambda () + ;; Already sorted, no need to reverse + (dolist (warning display-errors-pending) + (apply 'display-warning warning)) + (setq display-errors-pending nil))))))) + (defvar delayed-warnings-hook '(collapse-delayed-warnings + show-display-errors-when-idle display-delayed-warnings) "Normal hook run to process delayed warnings. Functions in this hook should access the `delayed-warnings-list' =3D=3D=3D modified file 'src/xdisp.c' --- src/xdisp.c 2012-01-19 07:21:25 +0000 +++ src/xdisp.c 2012-01-26 16:42:45 +0000 @@ -9069,6 +9069,12 @@ message_dolog (buffer, len - 1, 1, 0); SAFE_FREE (); + args[0] =3D Qdisplay; + args[1] =3D msg; + args[2] =3D Qerror; + Vdelayed_warnings_list =3D Fcons (Flist (3, args), + Vdelayed_warnings_list); + UNGCPRO; }