0

I am using orgmode in emacs with Ubuntu.

I would like to display images with my external viewer ( /usr/bin/eog ) when I specify an image with:

[[file:Screenshot from 2022-11-03 05-03-37.png]]

in my orgmode files.

Presently my complete file looks like this:

#+STARTUP: noinlineimages
** test-entry
[[file:Screenshot from 2022-11-03 05-03-37.png]]

and the picture gets displayed this way: enter image description here

As mentioned, I would like to display that image with my external viewer ( /usr/bin/eog ).

As I am a real beginner with emacs, I have difficulties to know what I have to update.

This is my present emacs configuration file (the one I know about):

~/.emacs:

  ;; Added by Package.el.  This must come before configurations of
  ;; installed packages.  Don't delete this line.  If you don't want it,
  ;; just comment it out by adding a semicolon to the start of the line.
  ;; You may delete these explanatory comments.
  (package-initialize)

  (recentf-mode 1)
  (setq recentf-max-menu-items 25)
  (global-set-key "\C-x\ \C-r" 'recentf-open-files)

  (global-auto-revert-mode t)

  (setq org-startup-with-inline-images t)

  (cua-mode t)
  (setq cua-auto-tabify-rectangles nil) ;; Don't tabify after rectangle commands
  (transient-mark-mode 1) ;; No region when it is not highlighted
  (setq cua-keep-region-after-copy t) ;; Standard Windows behaviour
  (custom-set-variables
   ;; custom-set-variables was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
   '(custom-enabled-themes (quote (deeper-blue))))
  (custom-set-faces
   ;; custom-set-faces was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.
   ;; Your init file should contain only one such instance.
   ;; If there is more than one, they won't work right.
   )

It seems to me that the directory ~/.emacs.d does not contain any configuration. If I should show the contents of some files there: please inform me and I will update this post accordingly.

1 Answer 1

0

You can customize org-file-apps for that using M-x customize-variable, press return, and type org-file-apps (the M-x should be reached by pressing Alt M on most keyboards).

Insert another element setting (upper part on the left -> press [INS] button):

Extension: \.png\'

Command: eog %s

I guess it is easiest to just repeat these steps for other image file extensions.

Don't forget to press Apply and Save before leaving the customize buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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