GNU bug report logs -
#17616
patch for svg-clock.el
Previous Next
Reported by: dieter <at> schoen.or.at
Date: Wed, 28 May 2014 15:31:02 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 message
"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 as
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
[Message part 2 (text/html, inline)]
This bug report was last modified 11 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.