unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs/notmuch-tag.el: add xmlns attribute to svg icons
@ 2022-01-13 21:19 LdBeth
  2022-01-13 22:12 ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: LdBeth @ 2022-01-13 21:19 UTC (permalink / raw)
  To: Notmuch Mailing List

emacs-mac that compiled with OS X system API instead of imagemagick
cannot render svg without xmlns correctly [1].

[1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com
---
 emacs/notmuch-tag.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 145f309f..8af09e68 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -241,7 +241,7 @@ DATA is the content of an SVG picture (e.g., as returned by
   "Return SVG data representing a star icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(-242.81601,-315.59635)\">
     <path
        d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
@@ -254,7 +254,7 @@ This can be used with `notmuch-tag-format-image-data'."
   "Return SVG data representing an empty star icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(-242.81601,-315.59635)\">
     <path
        d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
@@ -267,7 +267,7 @@ This can be used with `notmuch-tag-format-image-data'."
   "Return SVG data representing a tag icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(0,-1036.3622)\">
     <path
        d=\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700893,3.616 -12.50000043,0 z\"
-- 
2.20.1


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

* Re: [PATCH] emacs/notmuch-tag.el: add xmlns attribute to svg icons
  2022-01-13 21:19 [PATCH] emacs/notmuch-tag.el: add xmlns attribute to svg icons LdBeth
@ 2022-01-13 22:12 ` Tomi Ollila
  2022-01-14 13:15   ` [PATCH v2] " LdBeth
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2022-01-13 22:12 UTC (permalink / raw)
  To: LdBeth, Notmuch Mailing List

On Thu, Jan 13 2022, LdBeth wrote:

> emacs-mac that compiled with OS X system API instead of imagemagick
> cannot render svg without xmlns correctly [1].

Referecing Imagemagick in this commit message may be incorrect, otherwise
content looks good.

In case of Emacs 26, when imagemagick is used to render svg images,
transparent background is rendered white. The alternative "librsvg" 
(if I remember correctly, does not do that). I've tried hard to scale
svg images while doing notmuch-logo.svg but it always failed, when using
imagemagick background got white (bad when using dark background), and
when not using, image got clipped instead of resized. 

So, I cannot say for sure imagemagick is not used to render these icons,
but I'd guess so.

Btw: when using emacs 27, and pressing '+' or '-' when cursor is on
the (svg) notmuch logo in notmuch-hello window, background does not
render white, as happened with emacs 26.

Tomi

>
> [1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com
> ---
>  emacs/notmuch-tag.el | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
> index 145f309f..8af09e68 100644
> --- a/emacs/notmuch-tag.el
> +++ b/emacs/notmuch-tag.el
> @@ -241,7 +241,7 @@ DATA is the content of an SVG picture (e.g., as returned by
>    "Return SVG data representing a star icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(-242.81601,-315.59635)\">
>      <path
>         d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
> @@ -254,7 +254,7 @@ This can be used with `notmuch-tag-format-image-data'."
>    "Return SVG data representing an empty star icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(-242.81601,-315.59635)\">
>      <path
>         d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
> @@ -267,7 +267,7 @@ This can be used with `notmuch-tag-format-image-data'."
>    "Return SVG data representing a tag icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(0,-1036.3622)\">
>      <path
>         d=\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700893,3.616 -12.50000043,0 z\"
> -- 
> 2.20.1

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

* [PATCH v2] emacs/notmuch-tag.el: add xmlns attribute to svg icons
  2022-01-13 22:12 ` Tomi Ollila
@ 2022-01-14 13:15   ` LdBeth
  2022-01-14 20:21     ` Tomi Ollila
  2022-01-14 21:15     ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: LdBeth @ 2022-01-14 13:15 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: Notmuch Mailing List

emacs-mac that compiled with OS X system API for image display
support cannot correctly render svg without xmlns parameter [1].

[1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com
---
 emacs/notmuch-tag.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 145f309f..8af09e68 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -241,7 +241,7 @@ DATA is the content of an SVG picture (e.g., as returned by
   "Return SVG data representing a star icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(-242.81601,-315.59635)\">
     <path
        d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
@@ -254,7 +254,7 @@ This can be used with `notmuch-tag-format-image-data'."
   "Return SVG data representing an empty star icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(-242.81601,-315.59635)\">
     <path
        d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
@@ -267,7 +267,7 @@ This can be used with `notmuch-tag-format-image-data'."
   "Return SVG data representing a tag icon.
 This can be used with `notmuch-tag-format-image-data'."
   "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
-<svg version=\"1.1\" width=\"16\" height=\"16\">
+<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
   <g transform=\"translate(0,-1036.3622)\">
     <path
        d=\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700893,3.616 -12.50000043,0 z\"
-- 
2.20.1

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

* Re: [PATCH v2] emacs/notmuch-tag.el: add xmlns attribute to svg icons
  2022-01-14 13:15   ` [PATCH v2] " LdBeth
@ 2022-01-14 20:21     ` Tomi Ollila
  2022-01-14 21:15     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2022-01-14 20:21 UTC (permalink / raw)
  To: LdBeth; +Cc: Notmuch Mailing List

On Fri, Jan 14 2022, LdBeth wrote:

> emacs-mac that compiled with OS X system API for image display
> support cannot correctly render svg without xmlns parameter [1].

LGTM.

Tomi

>
> [1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com
> ---
>  emacs/notmuch-tag.el | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
> index 145f309f..8af09e68 100644
> --- a/emacs/notmuch-tag.el
> +++ b/emacs/notmuch-tag.el
> @@ -241,7 +241,7 @@ DATA is the content of an SVG picture (e.g., as returned by
>    "Return SVG data representing a star icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(-242.81601,-315.59635)\">
>      <path
>         d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
> @@ -254,7 +254,7 @@ This can be used with `notmuch-tag-format-image-data'."
>    "Return SVG data representing an empty star icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(-242.81601,-315.59635)\">
>      <path
>         d=\"m 290.25762,334.31206 -17.64143,-11.77975 -19.70508,7.85447 5.75171,-20.41814 -13.55925,-16.31348 21.19618,-0.83936 11.325,-17.93675 7.34825,19.89939 20.55849,5.22795 -16.65471,13.13786 z\"
> @@ -267,7 +267,7 @@ This can be used with `notmuch-tag-format-image-data'."
>    "Return SVG data representing a tag icon.
>  This can be used with `notmuch-tag-format-image-data'."
>    "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
> -<svg version=\"1.1\" width=\"16\" height=\"16\">
> +<svg version=\"1.1\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\">
>    <g transform=\"translate(0,-1036.3622)\">
>      <path
>         d=\"m 0.44642857,1040.9336 12.50000043,0 2.700893,3.6161 -2.700893,3.616 -12.50000043,0 z\"
> -- 
> 2.20.1

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

* Re: [PATCH v2] emacs/notmuch-tag.el: add xmlns attribute to svg icons
  2022-01-14 13:15   ` [PATCH v2] " LdBeth
  2022-01-14 20:21     ` Tomi Ollila
@ 2022-01-14 21:15     ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2022-01-14 21:15 UTC (permalink / raw)
  To: LdBeth, Tomi Ollila; +Cc: Notmuch Mailing List

LdBeth <andpuke@foxmail.com> writes:

> emacs-mac that compiled with OS X system API for image display
> support cannot correctly render svg without xmlns parameter [1].
>
> [1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com

applied to master.

d

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

end of thread, other threads:[~2022-01-14 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 21:19 [PATCH] emacs/notmuch-tag.el: add xmlns attribute to svg icons LdBeth
2022-01-13 22:12 ` Tomi Ollila
2022-01-14 13:15   ` [PATCH v2] " LdBeth
2022-01-14 20:21     ` Tomi Ollila
2022-01-14 21:15     ` David Bremner

Code repositories for project(s) associated with this inbox:

	notmuch.git.git (no URL configured)

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