2

How does Emacs display inline image for svg and gif formats in Org-mode? With imagemagick or something else? I know [C-c C-x C-v] toogle inline image display.

I found in Emacs 24.3 old version, I can inline view svg and gif images in Org-mode, but in Emacs 25.1, it can't, it will auto open svg and gif image link ([[file:/path/to/file.gif]]) with external program. Does Emacs added some new options for this?

I just want Emacs can inline display support those image formats.

Found config in my init file which cause this problem:

(add-to-list 'openwith-associations '("\\.gif\\'" "gwenview" (file)))
(add-to-list 'openwith-associations '("\\.svg\\'" "feh --magick-timeout 5" (file)))
1

From the manual:

C-c C-x C-v (org-toggle-inline-images)

Toggle the inline display of linked images. Normally this will only inline images that have no description part in the link, i.e., images that will also be inlined during export. When called with a prefix argument, also display images that do have a link description. You can ask for inline images to be displayed at startup by configuring the variable org-startup-with-inline-images.

So, for images without descriptions, you can toggle inline display with C-c C-x C-v, and you can customize the variable org-startup-with-inline-images to make this the default behaviour.

This won't work for images with descriptions, but then, if you have a description you probably want that to be displayed anyways?

  • I know [C-c C-x C-v] can toggle inline image display, I want to know Why Emacs 25.1 does not show svg and gif image inline but open with external program. And how to display this two formats inline in Org-mode. – stardiviner Sep 28 '16 at 14:00
  • It does display svg inline for me, using Emacs 25.1.1, when I press C-c C-x C-v anywhere in the org buffer. It only opens the image in an external viewer if I press return while point is in the link, which calls org-open-at-point. Have you tried this with emacs -Q? Maybe something in your config is changing things. – Tyler Sep 28 '16 at 14:14
  • I see. That must be my init config problem. I will emacs -Q debug. Thanks – stardiviner Sep 28 '16 at 14:31
  • @stardiviner have you been able to make this work? I have the same issue. Everything was working fine in Emacs 24.3, but it is not working anymore with 25.1. I am using Windows. I have the proper DLL in place, and it is still not working. – Neoasimov Nov 7 '16 at 20:43
  • @Neoasimov I use Linux, and as I updated my question, I removed the open with association to fix this problem. Maybe you should check out that configure too. Hope this can help you. – stardiviner Nov 8 '16 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.