emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SVG with embedded png


From: Alan Third
Subject: Re: SVG with embedded png
Date: Tue, 18 May 2021 19:05:41 +0100

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]