Here is a little function that allows a user to insert a screenshot easily. Only works on unix-like systems where ImageMagick is installed (adapt "import" to your screenshot program if needed).


(defun my-screenshot ()
"Take a screenshot into a unique-named file in the current buffer file directory and insert a link to this file."

 (interactive)
 (setq filename
  (concat
   (make-temp-name
    (file-name-directory (buffer-file-name))
   )
   ".jpg"
  )
 )

 (call-process "import" nil nil nil filename)
 (insert (concat "[[" filename "]]"))
 (org-display-inline-images)
)




Cheers,

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to