Skip to content

Instantly share code, notes, and snippets.

@cmrfrd
Created December 6, 2019 01:41
Show Gist options
  • Save cmrfrd/3117c9f18da37dc7ee651436072d20a0 to your computer and use it in GitHub Desktop.
Save cmrfrd/3117c9f18da37dc7ee651436072d20a0 to your computer and use it in GitHub Desktop.
org_include_file_ref.org
(org-babel-do-load-languages
  'org-babel-load-languages
  '((shell . t)
    (go . t))))
(defun org-global-props (&optional property buffer)
  "Get the plists of global org properties of current buffer."
  (unless property (setq property "PROPERTY"))
  (with-current-buffer (or buffer (current-buffer))
    (org-element-map (org-element-parse-buffer) 'keyword (lambda (el) (when (string-match property (org-element-property :key el)) el)))))

(defun org-global-prop-value (key)
  "Get global org property KEY of current buffer."
  (org-element-property :value (car (org-global-props key))))

Yaml things

test: yay
woot: y0asdf
call_f1()
echo

Looking and executing some go from another file

func main() {
    fmt.Println("this is pretty cool")
}
this is pretty cool

Looking and executing some python from a src block

a = 5
print(a)
print("yee haw")
5
yeehaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment