From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: SVG with embedded png Date: Tue, 18 May 2021 19:05:41 +0100 Message-ID: References: <87pmxomibv.fsf@Proteus> <87sg2kgqdb.fsf@fastmail.fm> <877djwm868.fsf@Proteus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joost Kremers , emacs-devel@gnu.org To: Joe Corneli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 18 20:07:17 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lj47h-0009U3-Ir for ged-emacs-devel@m.gmane-mx.org; Tue, 18 May 2021 20:07:17 +0200 Original-Received: from localhost ([::1]:47132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj47g-0000LQ-Ks for ged-emacs-devel@m.gmane-mx.org; Tue, 18 May 2021 14:07:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj46W-0007kp-9N for emacs-devel@gnu.org; Tue, 18 May 2021 14:06:06 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:47771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj46N-0007kV-HH for emacs-devel@gnu.org; Tue, 18 May 2021 14:06:03 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id CE53760800; Tue, 18 May 2021 18:05:44 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1621361144; bh=qnZz4FFnegSLUIxb9IKTK0wiwVcsgJoeiLFDJR8a+2E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Lr3e4OjF2tDDgcypdPchSlWQuJ7bHwoYfk+hxy7m6wl60Cl8GWpjFd67dcEg9+euT ksG9SknUbkcUf1bkx1GiHoOBUr+71ohdM+DtBa1ObDgjukZ0VmA67U19Bu6PCq6D9/ 7V1dKGvxVQYqxuKvG993ufLpaMRZK+PicyZM9aDOeBmFWfXbc/rlSwhgd0fhTBZ/gi TiZiNXvJb+GbuXz51EAy7pOXvcxwOMMi5KaSUopolItZaXBqMQ6pX+QLuQAniRUIq0 o4z/nc+PfqRB9j6ufC4ErnPWttHkWKVIdFp446rEFGBwCoINnNK0AjEKv/VHEah8mi yjueM4SZQim5w== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94) (envelope-from ) id 1lj469-0001BU-E8; Tue, 18 May 2021 19:05:41 +0100 Mail-Followup-To: Alan Third , Joe Corneli , Joost Kremers , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <877djwm868.fsf@Proteus> Received-SPF: pass client-ip=116.202.65.218; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269468 Archived-At: 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