(defun my-org-screenshot () "Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file." (interactive) (setq screenshot_dir ".\\images\\") (setq tilde-buffer-filename (replace-regexp-in-string "/" "\\" (buffer-name) t t)) (setq filename (concat (make-temp-name (concat screenshot_dir tilde-buffer-filename ;; attempt to make irfanview approach work "_" (format-time-string "%Y%m%d_%H%M%S_")) ) ".png")) (insert (concat "[[file:" filename "]]")) (org-display-inline-images))
(global-set-key "\C-cs" 'my-org-screenshot)
(Like this)Here is the lisp with formatting:
(defun my-org-screenshot ()
"Take a screenshot into a time stamped unique-named file in the same directory as the org-buffer and insert a link to this file."
(interactive)
(setq screenshot_dir ".\\images\\")
(setq tilde-buffer-filename
(replace-regexp-in-string "/" "\\" (buffer-name) t t))
(setq filename
(concat
(make-temp-name
(concat screenshot_dir
tilde-buffer-filename ;; attempt to make irfanview approach work
"_"
(format-time-string "%Y%m%d_%H%M%S_")))
".png"))
(insert (concat "[[file:" filename "]]"))
(org-display-inline-images))Thanks for the tip. Mostly emacsing via X, but good to know.
I wa salso curios about org-roam but I'm letting it sitt for a while
At least that has been my experience a more seasoned orger can correct my ignorance if I do err.