Copy links from image

I'm working with directories full of images, which are photographs of documents in an archive. I'm writing org files with notes on the content of these, and I would like to make it quicker and easier to browse the images (eg with image-dired) and copy links into the org-mode file alongside my notes.

My working setup looks like this:

图像浏览器和emacs中的组织

My questions are:

  • How can I automatically copy a link for the currently displayed image into org?
  • Is there any easy way to control the image-dired picture (browsing backwards and forwards, rotating) from within the org windows?
  • Are there any other modes or tools that I should be looking at?

  • Here is a little code to make working with images easier. Just copy it into your *scratch* buffer and run Mx 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)
    

    Press F9 n to switch to the next image while in org mode, press F9 i to insert a link to the current image. Rebind keys to your liking.

    链接地址: http://www.djcxy.com/p/30646.html

    上一篇: 在emacs组织中打开Pelican相对路径

    下一篇: 复制图片中的链接