Hi Charles and Carsten

sorry for the belated repsonse but i have been tied up at work with other
projects.
So going back to the original question, i have used your example code
Charles and modified it to work on my linux box, though i have zero lisp
(or any other programming) knowledge so im not sure its correct:

;;org screenshot
   (defun paste-clipboard-to-file (&optional filename temp-dir)
     "Take a screenshot using the crosshairs and saveit to FILENAME,if it
is given or to a temp file in the TEMP-DIR
     directory. Then add an orgmode style link at point."
     (interactive)
     (let* ((temporary-file-directory (or temp-dir "images"))
            (fname (or filename (make-temp-file "img" nil ".jpg"))))
       (call-process-shell-command (concat
                                     "/usr/bin/scrot -s -d 2 " fname))
       (insert "\n[[file:" fname "]]")
       (org-display-inline-images)))
   ;;
   (global-set-key (kbd "C-c p") 'paste-clipboard-to-file)


there are still some question i have. the little function seems to work and
i do get an inline image inside org bit it seems to me it only work on the
current window/workspace, is that correct? how can i modify it catch a
screenshot from a web browser, PDF, other workspace etc?

-also can one insert a delete mechanism for files deleted from the inline
buffer (with a confirmation ofc). the reason i ask is because alot of the
times the first 'take' isnt correct and that leaves alot of junk in these
folders that are hard to trace manually

best wishes and thank you all for your help

best

Z

Reply via email to