Created
February 4, 2018 03:45
-
-
Save dustinlacewell-wk/3e2f5138916d4e3734fe7b0f5c4fe98c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-life-do (name &rest args) | |
(with-temp-buffer | |
(insert-file-contents org-life-support-file-name) | |
(org-babel-goto-named-src-block name) | |
(let ((info (org-babel-get-src-block-info))) | |
(dotimes (i (length args)) | |
(let* ((params (third info)) | |
(vars (org-life-get-val-props params)) | |
(arg (elt args i)) | |
(index (make-symbol (format "%s" i)))) | |
(--when-let (elt vars i) | |
(setcdr it (list index arg))))) | |
(message "INFO: %s" info) | |
(org-babel-execute-src-block-maybe nil info)))) | |
(org-life-do "chrome-open" "http://reddit.com") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment