From: dieter@schoen.or.at
To: 17616@debbugs.gnu.org
Subject: bug#17616: patch for svg-clock.el
Date: Wed, 28 May 2014 11:24:19 +0000 (GMT) [thread overview]
Message-ID: <f565bb9.4338ffb1617db5203513528aeecdd26c@afterlogic.edis.at> (raw)
[-- 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 --]
next reply other threads:[~2014-05-28 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 11:24 dieter [this message]
2014-06-01 2:04 ` bug#17616: patch for svg-clock.el Stefan Monnier
2014-06-01 7:31 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f565bb9.4338ffb1617db5203513528aeecdd26c@afterlogic.edis.at \
--to=dieter@schoen.or.at \
--cc=17616@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).