From: Pip Cet <pipcet@gmail.com>
To: Dieter Deyke <dieter.deyke@gmail.com>
Cc: larsi@gnus.org, 36414@debbugs.gnu.org
Subject: bug#36414: 27.0.50; svg-clock does not work anymore
Date: Fri, 28 Jun 2019 06:57:28 +0000 [thread overview]
Message-ID: <CAOqdjBeapWy3MY-oMAxR3JXbwqO8VStfg_Hgz4YFZRLDXCUrGg@mail.gmail.com> (raw)
In-Reply-To: <878stmcm7h.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
On Fri, Jun 28, 2019 at 5:29 AM Dieter Deyke <dieter.deyke@gmail.com> wrote:
> Executing (svg-clock) from elpa does not show the clock anymore, but just the
> single char '*'.
Sorry for barging in, I thought this might be related to the recent
image.c changes so I had a look.
svg-clock.el uses `svg-def', which is now an internal function,
`svg--def'. I believe Lars is the one working on this.
Can you try the attached patch to see whether that is indeed the problem?
[-- Attachment #2: 0001-Copy-svg-def-to-manipulate-the-DOM-directly-from-svg.patch --]
[-- Type: text/x-patch, Size: 1651 bytes --]
From 7ed2545ee2f182e419abbaf9050f765b98bf8f05 Mon Sep 17 00:00:00 2001
From: Pip Cet <pipcet@gmail.com>
Date: Fri, 28 Jun 2019 06:56:31 +0000
Subject: [PATCH] Copy svg--def to manipulate the DOM directly from
svg-clock.el
---
packages/svg-clock/svg-clock.el | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/packages/svg-clock/svg-clock.el b/packages/svg-clock/svg-clock.el
index bf0147cf6..922ebdce8 100644
--- a/packages/svg-clock/svg-clock.el
+++ b/packages/svg-clock/svg-clock.el
@@ -115,6 +115,15 @@ and `hour-hand'. The clock-face has a size of 1x1."
'rotate angle .5 .5)))
(number-sequence 0 354 6))))))
+(defun svg-clock--def (svg def)
+ (dom-append-child
+ (or (dom-by-tag svg 'defs)
+ (let ((node (dom-node 'defs)))
+ (dom-add-child-before svg node)
+ node))
+ def)
+ svg)
+
(defun svg-clock--create-svg (time size foreground background)
"Return an SVG element displaying an analog clock.
The clock shows the given TIME, it has a diameter of SIZE, and
@@ -140,8 +149,8 @@ its colors are FOREGROUND and BACKGROUND."
(svg-clock-transform
'rotate
(+ (* hours 30) (/ minutes 2.0)) .5 .5)))))
- (dolist (def defs) (svg-def svg def))
- (svg-def svg clock)
+ (dolist (def defs) (svg-clock--def svg def))
+ (svg-clock--def svg clock)
(dom-append-child svg
(svg-clock-use 'clock
(svg-clock-transform 'scale size size)))
--
2.20.1
next prev parent reply other threads:[~2019-06-28 6:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 5:28 bug#36414: 27.0.50; svg-clock does not work anymore Dieter Deyke
2019-06-28 6:57 ` Pip Cet [this message]
2019-06-28 8:13 ` Dieter Deyke
2020-08-18 11:21 ` Stefan Kangas
2020-08-18 11:33 ` Dieter Deyke
2020-08-18 12:13 ` Eli Zaretskii
2020-08-18 12:35 ` Lars Ingebrigtsen
2020-08-18 12:45 ` Stephen Berman
2020-08-18 12:50 ` Lars Ingebrigtsen
2019-06-30 21:37 ` Michael Heerdegen
2019-07-01 13:38 ` Pip Cet
2019-07-01 22:02 ` Michael Heerdegen
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=CAOqdjBeapWy3MY-oMAxR3JXbwqO8VStfg_Hgz4YFZRLDXCUrGg@mail.gmail.com \
--to=pipcet@gmail.com \
--cc=36414@debbugs.gnu.org \
--cc=dieter.deyke@gmail.com \
--cc=larsi@gnus.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).