Advertisement
goatbar

v2 of the screencapture for org on the mac

Sep 23rd, 2011
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.54 KB | None | 0 0
  1. ; Mac OSX version.  Tested on 10.7.  Will not work on other OSes.
  2. (defun my-org-screenshot ()
  3.   "Take a screenshot into a time stamped unique-named file in the
  4. same directory as the org-buffer and insert a link to this file."
  5.   (interactive)
  6.   ; FIX: take a file name rather than hour min sec
  7.   (setq filename (format-time-string "%Y/%m%d-%H%M%S.png"))
  8.   (call-process "sleep" nil nil nil "5")
  9.   (call-process "screencapture" nil nil nil "-T" "15" "-i" filename)
  10.   (insert (concat "[[" filename "]]\n\n"))
  11.   ;(org-display-inline-images)
  12. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement