Created
October 27, 2020 07:19
-
-
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
This file contains 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-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