Re: [O] Displaying inline svg images
> Kaushal Modi writes: > Hello Colin, Eric: First of all, thanks for checking things on > your end, and apologize for the noise. > I had an experimental setting of image-type-header-regexps lying > in my Emacs config and that messed up the SVG inlining. > All good now. No problem - I echo Eric's sentiments. We've all been there. Best wishes, -- Colin Baxter m43...@yandex.com
Re: [O] Displaying inline svg images
On Wednesday, 9 Jan 2019 at 11:16, Kaushal Modi wrote: > First of all, thanks for checking things on your end, and apologize > for the noise. No worries and I'm glad you got it sorted. These are complex systems and hence quite fragile (unfortunately). I spent quite some time this morning fighting embedded calc mode in an org file and the problem was also due to some other change I'd made... These things happen! -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
Re: [O] Displaying inline svg images
Hello Colin, Eric: First of all, thanks for checking things on your end, and apologize for the noise. I had an experimental setting of image-type-header-regexps lying in my Emacs config and that messed up the SVG inlining. All good now.
Re: [O] Displaying inline svg images
On Wednesday, 9 Jan 2019 at 06:53, Kaushal Modi wrote: > I see that you are running Emacs master. Can you also report the git > hash used to build it? Also, what is your imagemagick version? According to dpkg, emacs-snapshot 2:2018+emacs-26.1-3391-ga004d3bbbae-1 imagemagick8:6.9.10.14+dfsg-7 on Debian buster/sid. HTH -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
Re: [O] Displaying inline svg images
> Kaushal Modi writes: --- snip > Great! So any regression in Org mode 9.2 is ruled out :) > I need to see what's different in my environment: Emacs version, > imagemagick version. > Later today, I'll find out my imagemagick version, and also try > running my example on Emacs 26.1. If it helps, I tested your file using emacs-26.1 and ImageMagick 6.8.9-9. Best wishes, -- Colin Baxter m43...@yandex.com
Re: [O] Displaying inline svg images
> > Thanks Eric, Colin. Please see my further questions below. > Eric S Fraga writes: > > > Your example works fine for me but I am using a slightly old > > version of org so maybe something has changed? > > > -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442 > I see that you are running Emacs master. Can you also report the git hash used to build it? Also, what is your imagemagick version? On Wed, Jan 9, 2019, 3:18 AM Colin Baxter (release_9.2-152-gc006a6). > Great! So any regression in Org mode 9.2 is ruled out :) I need to see what's different in my environment: Emacs version, imagemagick version. Later today, I'll find out my imagemagick version, and also try running my example on Emacs 26.1. Thanks all! >
Re: [O] Displaying inline svg images
> Eric S Fraga writes: > On Wednesday, 9 Jan 2019 at 00:25, Kaushal Modi wrote: >> Hello, >> >> I am unable to display inline SVG images. > Your example works fine for me but I am using a slightly old > version of org so maybe something has changed? > -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442 Works fine for me too and I'm using Org mode version 9.2 (release_9.2-152-gc006a6). Best wishes, -- Colin Baxter m43...@yandex.com
Re: [O] Displaying inline svg images
On Wednesday, 9 Jan 2019 at 00:25, Kaushal Modi wrote: > Hello, > > I am unable to display inline SVG images. Your example works fine for me but I am using a slightly old version of org so maybe something has changed? -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
[O] Displaying inline svg images
Hello, I am unable to display inline SVG images. Here is the minimum reproducible example: 1. I have org-image-actual-width defcustom at its default value of t. 2. Here is the Org file: = #+startup: inlineimages [[file:red-blue-squares.svg]] = 3. Here is the example SVG file. Put it in the same dir as the Org file as red-blue-squares.svg. = http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> http://www.w3.org/2000/svg"; width="467" height="462"> = Upon saving the .svg file and then opening the .org file, I do not see the image inlined. Is anyone able to reproduce this? Upon investigating the org-display-inline-images function in org.el, I found that this happens because the internal variable width is evaluated as nil and `:width nil' gets passed to the `create-image' function .. resulting in a zero-width SVG. Though, this is not a problem with PNG and JPG images. As a quick workaround, I did this: = diff --git a/lisp/org.el b/lisp/org.el index ea1607d85..54e8d0142 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18618,7 +18618,8 @@ boundaries." (let ((image (create-image file (and width 'imagemagick) nil -:width width))) +;; :width width +))) (when image (let ((ov (make-overlay (org-element-property :begin link) = i.e. I stopped passing the :width property to create-image altogether and after that the SVG image showed inline just fine. So, is there any point passing `:width width' if width is nil? If not, I can work on a patch that prevents passing that property only in that case. Org version: Org mode version 9.2 (release_9.2-151-g8a5d8f ..) | master branch Emacs version: GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 2.24.23) of 2019-01-08, built using commit 55c5e26307a1e8f1fff74415fc560aa172a421cf | master branch -- Kaushal Modi