unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH]: Add xmlns:link namespace for svg-create
@ 2020-03-20  8:01 Zhu Zihao
  2020-03-20  8:37 ` Zhu Zihao
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Zihao @ 2020-03-20  8:01 UTC (permalink / raw)
  To: emacs-devel

After update my librsvg from 2.46.4 to 2.48.0. Emacs failed to render the svg
image with image embbed generated by svg-create in svg.el.

An example SVG is here: https://pastebin.com/9QnuMy7Y

The reason is svg.el use xmlns:xlink but fails to specify namespace for it. So
new version librsvg reject this SVG.

I've submitted this bug to issue tracker a week before but no reply, so I post
it here again

~~~

From 93188f91906dea87bfbf62e18b608bbd2f84c7af Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last <at> 163.com>
Date: Tue, 10 Mar 2020 19:46:03 +0800
Subject: [PATCH] fix: Specify xlink namespace for svg images.

---
 lisp/svg.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/svg.el b/lisp/svg.el
index 6a2fc4c90fc..370c9c04e76 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -70,7 +70,8 @@ svg-create
 	      (height . ,height)
 	      (version . "1.1")
 	      (xmlns . "http://www.w3.org/2000/svg")
-	      ,@(svg--arguments nil args))))
+              (xmlns:xlink . "http://www.w3.org/1999/xlink")
+              ,@(svg--arguments nil args))))
 
 (defun svg-gradient (svg id type stops)
   "Add a gradient with ID to SVG.
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re:[PATCH]: Add xmlns:link namespace for svg-create
  2020-03-20  8:01 [PATCH]: Add xmlns:link namespace for svg-create Zhu Zihao
@ 2020-03-20  8:37 ` Zhu Zihao
  2020-03-20  9:29   ` [PATCH]: " Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Zihao @ 2020-03-20  8:37 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

Link to original bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40010



The patch I attached in last email have some wrong semicolons. For someone want to try this patch, use patch in bug report instead.



[-- Attachment #2: Type: text/html, Size: 535 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH]: Add xmlns:link namespace for svg-create
  2020-03-20  8:37 ` Zhu Zihao
@ 2020-03-20  9:29   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-03-20  9:29 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: emacs-devel

> Date: Fri, 20 Mar 2020 16:37:02 +0800 (CST)
> From: "Zhu Zihao" <all_but_last@163.com>
> 
> Link to original bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40010

Thanks, but there's no need to double a bug report by posting in this
list.  All the people who are relevant for reading and processing bug
reports receive them from the bug-gnu-emacs list, and will review and
act on the patch you proposed soon enough.

Thank you for your interest in Emacs.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-20  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-20  8:01 [PATCH]: Add xmlns:link namespace for svg-create Zhu Zihao
2020-03-20  8:37 ` Zhu Zihao
2020-03-20  9:29   ` [PATCH]: " Eli Zaretskii

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).