Copy links from image to org-mode

I work with catalogs full of images that are photographs of documents in the archive. I write org files with notes on their contents, and I would like to speed up and speed up the viewing of images (for example, using an image) and copy the links to the org-mode file along with my notes.

My working setup is as follows:

Image browser and org in emacs

My questions:

  • How can I automatically copy the link for the currently displayed image in org?
  • Is there any easy way to control a graphic image (look back and forth, rotate) from org windows?
  • Are there any other modes or tools that I should look at?
+4
source share
1 answer

, . *scratch* M-x eval-buffer.

(defun my-next-image ()
  (interactive)
  (save-excursion 
    (with-current-buffer "*image-dired*"
      (image-dired-forward-image)
      (image-dired-display-thumbnail-original-image))))

(defun my-prev-image ()
  (interactive)
  (save-excursion 
    (with-current-buffer "*image-dired*"
      (image-dired-backward-image)
      (image-dired-display-thumbnail-original-image))))

(defun my-insert-current-image-path ()
  (interactive)
  (insert
   (concat
    "[["
    (save-excursion
      (with-current-buffer "*image-dired*"
        (image-dired-original-file-name)))
    "]]")))


(define-key org-mode-map (kbd "<f9> n") 'my-next-image)
(define-key org-mode-map (kbd "<f9> p") 'my-prev-image)
(define-key org-mode-map (kbd "<f9> i") 'my-insert-current-image-path)

F9 n, org, F9 i, . .

+3

All Articles