From: Alan Third <alan@idiocy.org>
To: Joe Corneli <joseph.corneli.em@hyperreal.enterprises>
Cc: Joost Kremers <joostkremers@fastmail.fm>, emacs-devel@gnu.org
Subject: Re: SVG with embedded png
Date: Tue, 18 May 2021 19:05:41 +0100 [thread overview]
Message-ID: <YKQB9V/KJ+xeqpeW@idiocy.org> (raw)
In-Reply-To: <877djwm868.fsf@Proteus>
On Tue, May 18, 2021 at 03:24:31PM +0100, Joe Corneli via Emacs development discussions. wrote:
> Joost Kremers writes:
>
> > If I manually change the link to a relative one on my computer, Emacs (27.2)
> > shows the linked png just fine (provided the png image is in the directory
> > pointed to, of course). Why your Emacs isn't able to find the png, I don't know.
> > Perhaps you moved it in between viewing the svg in Firefox and Emacs?
>
> OP here, apologies: I neglected to make the link in my demo code easily
> transferrable for testing! I’ve streamlined the reproduction case.
>
> Please try this:
>
> $ emacs -Q demo.org
>
> ...where the org file is the one that’s attached, and the PNG file
> Tft1st.png is saved in the /tmp directory:
>
> $ ls -lt /tmp/Tft1st.png
> -rw-rw-r-- 1 joe joe 391204 May 18 15:00 /tmp/Tft1st.png
>
> Lastly, evaluate the Org block with C-c C-c.
More than likely the problem is that the image file isn't within the
SVG file's sub-tree. Librsvg won't load URLs that aren't in the same
directory as the SVG file or in a subdirectory.
This is why people grabbing the two files and dumping them in the same
directory see the image, but if you put the png in /tmp it doesn't.
This is a security feature, apparently.
(I thought using :base_uri when loading the image was supposed to work
around this, but apparently not...)
--
Alan Third
next prev parent reply other threads:[~2021-05-18 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 10:45 SVG with embedded png Joe Corneli via Emacs development discussions.
2021-05-18 12:25 ` Eli Zaretskii
2021-05-18 12:50 ` tomas
2021-05-18 12:54 ` Basil L. Contovounesios
2021-05-18 12:40 ` Joost Kremers
2021-05-18 14:24 ` Joe Corneli via Emacs development discussions.
2021-05-18 18:05 ` Alan Third [this message]
2021-05-18 18:09 ` Alan Third
2021-05-19 12:57 ` Joe Corneli via Emacs development discussions.
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YKQB9V/KJ+xeqpeW@idiocy.org \
--to=alan@idiocy.org \
--cc=emacs-devel@gnu.org \
--cc=joostkremers@fastmail.fm \
--cc=joseph.corneli.em@hyperreal.enterprises \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.