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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17616 in the body.
You can then email your comments to 17616 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17616
; Package
emacs
.
(Wed, 28 May 2014 15:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
dieter <at> schoen.or.at
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 28 May 2014 15:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17616
; Package
emacs
.
(Sun, 01 Jun 2014 02:05:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 17616 <at> debbugs.gnu.org (full text, mbox):
> 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
bug closed, send any further explanations to
17616 <at> debbugs.gnu.org and dieter <at> schoen.or.at
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> debbugs.gnu.org
.
(Sun, 01 Jun 2014 02:08:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17616
; Package
emacs
.
(Sun, 01 Jun 2014 07:32:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 17616 <at> debbugs.gnu.org (full text, mbox):
> 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 29 Jun 2014 11:24:03 GMT)
Full text and
rfc822 format available.
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.