Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created February 1, 2018 06:22
Show Gist options
  • Save dustinlacewell-wk/cee217f085ec4d1294d6949714fdb889 to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/cee217f085ec4d1294d6949714fdb889 to your computer and use it in GitHub Desktop.

extract-src-content

(defun extract-src-content (name)
  (save-excursion
    (org-babel-goto-named-src-block name)
    (org-element-property :value (org-element-at-point))))

execute-as-block

(defun execute-as-block (name &rest args)
  (let* ((tpl (extract-src-content name))
         (src (apply 'format (cons tpl args))))
    (do-applescript src)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment