Skip to content

Instantly share code, notes, and snippets.

@mrotaru
Created October 27, 2020 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrotaru/8d9540c696e57b724eb89aa03c21e5f2 to your computer and use it in GitHub Desktop.
Save mrotaru/8d9540c696e57b724eb89aa03c21e5f2 to your computer and use it in GitHub Desktop.
Attempt at a simple elisp snippet that would enable executing nim code blocks
(defun org-babel-execute:nim (body params)
"Execute a block of Nim code with org-babel."
(message "executing Nim source code block")
(let* (in-file (org-babel-temp-file "nim-")))
(with-temp-file in-file
(insert body))
(org-babel-eval (format "nim r %s" (org-babel-process-file-name in-file))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment