Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (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 filename
- (concat
- (make-temp-name
- (concat (buffer-file-name)
- "_"
- (format-time-string "%Y%m%d_%H%M%S_")) ) ".png"))
- ; was import, which should be from imagemagick or graphicsmagick
- ; import only can do X11 windows
- ;(call-process "import" nil nil nil filename)
- ;(call-process "/sw/bin/import" nil nil nil filename)
- ; This is the mac version
- ; screencapture -T 5 foo.png
- (call-process "screencapture" nil nil nil "-T" "5" filename)
- (insert (concat "[[" filename "]]"))
- ;(org-display-inline-images)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement