Emacs org-display-inline-images

邮差的信 提交于 2019-11-30 11:18:23

问题


How can I display inline images in emacs org mode?

I have [[file:~/myimage.png]], which, when clicked, opens the image in a new buffer. But how to do it in the same buffer?

Note: C c C x C v is undefined, so I couldn't activate the inline images, but how do I solve this problem?


回答1:


This works for me:

(defun do-org-show-all-inline-images ()
  (interactive)
  (org-display-inline-images t t))
(global-set-key (kbd "C-c C-x C v")
                'do-org-show-all-inline-images)

And here's how I found how to do it:

  1. M-x apropos RET org.*image.*.
  2. F1 f org-display-inline-images.
  3. make a test.org with a link to picture.
  4. M-: (org-display-inline-images t t).
  5. wrap it in a defun/global-set-key.



回答2:


you need not define a custom function like @abo-abo , org-mode has provide such functions :

M-x 

- org-redisplay-inline-images
- org-display-inline-images     
- org-toggle-inline-images
- org-remove-inline-images  

M-x org-toggle-inline-images is quite enough for me , which toggle display/hiden inline images 


来源:https://stackoverflow.com/questions/17621495/emacs-org-display-inline-images

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!