* bug#17616: patch for svg-clock.el
@ 2014-05-28 11:24 dieter
2014-06-01 2:04 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: dieter @ 2014-05-28 11:24 UTC (permalink / raw)
To: 17616
[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 3743 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#17616: patch for svg-clock.el
2014-05-28 11:24 bug#17616: patch for svg-clock.el dieter
@ 2014-06-01 2:04 ` Stefan Monnier
2014-06-01 7:31 ` martin rudalics
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-06-01 2:04 UTC (permalink / raw)
To: dieter; +Cc: 17616
> 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
[...]
> --- a/packages/svg-clock/svg-clock.el
> +++ b/packages/svg-clock/svg-clock.el
> @@ -186,7 +186,7 @@ TIME must have the form (SECOND MINUTE HOUR ...), asreturned 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,4 +245,5 @@ Optionally PERFORM-UPDATE immediately."
> (setq svg-clock-timer
> (run-with-timer 0 1 'svg-clock-update))
> (svg-clock-mode)
> + (image-mode)
> (message "Clock started")))
Your patch was quite mangled, please try to use software that does mess
it up so badly next time. In any case I installed it into the `elpa'
branch, thank you.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#17616: patch for svg-clock.el
2014-06-01 2:04 ` Stefan Monnier
@ 2014-06-01 7:31 ` martin rudalics
0 siblings, 0 replies; 3+ messages in thread
From: martin rudalics @ 2014-06-01 7:31 UTC (permalink / raw)
To: Stefan Monnier, dieter; +Cc: 17616
> Your patch was quite mangled, please try to use software that does mess
> it up so badly next time.
Please try to not follow such advice.
martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-01 7:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28 11:24 bug#17616: patch for svg-clock.el dieter
2014-06-01 2:04 ` Stefan Monnier
2014-06-01 7:31 ` martin rudalics
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.