>From 5938b848f4b9b30b25c903e3487834f9400f6ad9 Mon Sep 17 00:00:00 2001 From: Viktor Rosenfeld Date: Tue, 21 May 2013 19:32:16 +0200 Subject: [PATCH] org-screenshot: Let user configure capture program. * org-screenshot.el (org-screenshot-capture-binary): Configure the binary to capture a screenshot. (org-screenshot-take): Do not use hardcoded `scrot' binary. --- contrib/lisp/org-screenshot.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/lisp/org-screenshot.el b/contrib/lisp/org-screenshot.el index a54cb8f..54c8074 100644 --- a/contrib/lisp/org-screenshot.el +++ b/contrib/lisp/org-screenshot.el @@ -85,6 +85,11 @@ "Options for taking and managing screen-shots" :group 'org-link) +(defcustom org-screenshot-capture-binary "scrot" + "Binary to capture screen contents. Use `scrot' on Linux and `screencapture' on Mac OS X." + :type 'string + :group 'org-screenshot) + (defcustom org-screenshot-image-directory "./images/" "Directory in which screenshot image files will be stored, it be automatically created if it does't already exist." @@ -307,7 +312,7 @@ screenshot is done, any more `C-u' after that increases delay by (or (apply 'start-process (append - (list "scrot" "*scrot*" "scrot" "-s" path) + (list "scrot" "*scrot*" org-screenshot-capture-binary "-s" path) (when (plusp delay) (list "-d" (format "%d" delay))))) (error "Unable to start scrot process"))) -- 1.8.2.3