From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dieter@schoen.or.at Newsgroups: gmane.emacs.bugs Subject: bug#17616: patch for svg-clock.el Date: Wed, 28 May 2014 11:24:19 +0000 (GMT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--=_NextPart_264c1bab1ab5a1609157824d0dce8574" X-Trace: ger.gmane.org 1401291097 22574 80.91.229.3 (28 May 2014 15:31:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2014 15:31:37 +0000 (UTC) To: 17616@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 28 17:31:31 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wpfp9-0000n1-D1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 17:31:27 +0200 Original-Received: from localhost ([::1]:42973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpfp8-0006pH-Vb for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 May 2014 11:31:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpfov-0006bh-CS for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 11:31:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpfol-0003ZD-4Y for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 11:31:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpfol-0003Z3-2L for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 11:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wpfok-0003Wj-EJ for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dieter@schoen.or.at Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 May 2014 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17616 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140129102511205 (code B ref -1); Wed, 28 May 2014 15:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2014 15:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:34687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wpfo2-0002nt-CS for submit@debbugs.gnu.org; Wed, 28 May 2014 11:30:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54572) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpbyY-0001jW-4b for submit@debbugs.gnu.org; Wed, 28 May 2014 07:24:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpbyI-0003US-QV for submit@debbugs.gnu.org; Wed, 28 May 2014 07:24:48 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpbyI-0003UC-O1 for submit@debbugs.gnu.org; Wed, 28 May 2014 07:24:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpbyA-00058y-Ci for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 07:24:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpby1-0003Cj-QZ for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 07:24:30 -0400 Original-Received: from postrelay210.edis.at ([91.227.204.210]:40418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpby1-0003Br-Fg for bug-gnu-emacs@gnu.org; Wed, 28 May 2014 07:24:21 -0400 Original-Received: from mailrelay.edis.at (postrelay210.edis.at [91.227.204.210]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by postrelay210.edis.at (Postfix) with ESMTPS id 857382001CC9 for ; Wed, 28 May 2014 13:24:19 +0200 (CEST) Original-Received: from schoen.or.at ([::ffff:91.227.204.20]) (AUTH: LOGIN dieter@schoen.or.at) by mailrelay.edis.at with esmtp; Wed, 28 May 2014 13:24:19 +0200 id 0000000006003364.000000005385C763.00000B58 X-Mailer: AfterLogic WebMail PHP X-Originating-IP: 194.138.12.168 X-Priority: 3 (Normal) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 28 May 2014 11:30:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:89621 Archived-At: ----=_NextPart_264c1bab1ab5a1609157824d0dce8574 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: Quoted-Printable Hi, I am using GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of 2014-05-28 and svg-clock 0.5. I found that because svg-clock calls (image-mode) every second, the mess= age "Type C-c C-c to view the image as an image." is displayed at the bottom of the screen every second. That overwrites all other messages. The following patch works for me: - it switched on image-mode when svg-clock is started - it only calls image-toggle-display-image when the buffer is in image-mode. I have seen that the latest commit fixes an issue with image-mode, but a= s far as I can tell, my patch does not introduce a regression. diff --git a/packages/svg-clock/svg-clock.el b/packages/svg-clock/svg-clock.el index 3897243..ff98e5b 100644 --- a/packages/svg-clock/svg-clock.el +++ b/packages/svg-clock/svg-clock.el @@ -186,8 +186,8 @@ TIME must have the form (SECOND MINUTE HOUR ...), as= returned by `decode-time'." (svg-clock-replace "%SIZE%" (format "%d" svg-clock--actual-size))= (svg-clock-replace "%SCALE%" (format "%f" (/ svg-clock--actual-size 100.0))= ) - (image-mode) - (image-toggle-display-image)))) + (when (derived-mode-p 'image-mode) + (image-toggle-display-image))))) (defun svg-clock-update () "Update the clock." @@ -245,6 +245,7 @@ Optionally PERFORM-UPDATE immediately." (setq svg-clock-timer (run-with-timer 0 1 'svg-clock-update)) (svg-clock-mode) + (image-mode) (message "Clock started"))) kind regards, dieter ----=_NextPart_264c1bab1ab5a1609157824d0dce8574 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: Quoted-Printable
Hi,
I am us= ing GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) o= f 2014-05-28
and  = ;svg-clock 0.5.

I found that because sv= g-clock calls (image-mode) every second, the message
"Type C-c C-c to view the image as an ima= ge."
is displayed at t= he bottom of the screen every second. 
That overwrites all other messages.
The following patch works for me:
- it switched on image-mod= e when svg-clock is started
- it only calls image-toggle-display-image when the buffer is in ima= ge-mode.

I have seen that the latest co= mmit fixes an issue with image-mode, but as far as I can tell,
my patch does not introduce a r= egression.

=
diff --git a/packages/svg-cl= ock/svg-clock.el b/packages/svg-clock/svg-clock.el
index 3897243..ff98e5b 100644
<= div>--- a/packages/svg-clock/svg-clock.= el
+++ b/packages/svg-= clock/svg-clock.el
@@ = -186,8 +186,8 @@ TIME must have the form (SECOND MINUTE HOUR ...), as re= turned by `decode-time'."
       (svg-clock-replace "%SIZE%" (format "%d" = svg-clock--actual-size))
       (svg-clock-replace "%SCALE%"
<= div>          =                 (format "%f" (/ = svg-clock--actual-size 100.0)))
-      (image-mode)
-      (image-toggle-display-image= ))))
+     &= nbsp;(when (derived-mode-p 'image-mode)
+        (image-toggle-display-ima= ge)))))
 <= /div>
 (defun svg-clock-update= ()
   "Upda= te the clock."
@@ -245= ,6 +245,7 @@ Optionally PERFORM-UPDATE immediately."
     (setq svg-clock-timer=
      =      (run-with-timer 0 1 'svg-clock-update))
=
     (svg-clock-mod= e)
+    (ima= ge-mode)
   =  (message "Clock started")))
 
kind regards,
dieter
<= /body> ----=_NextPart_264c1bab1ab5a1609157824d0dce8574--