ob-go
ob-go copied to clipboard
problem with evaluating result
(if-let ((results
(org-babel-eval
(format "%s run %s \"%s\" %s"
org-babel-go-command
(mapconcat 'identity (org-babel-go-as-list flags) " ")
(org-babel-process-file-name tmp-src-file)
(mapconcat #'(lambda (a)
;; If there's a chance that the symbol is a
;; ref, use that. Otherwise, just return the
;; string form of the value.
(format "%S" (if (symbolp a)
(let* ((ref (symbol-name a))
(out (org-babel-read ref)))
(if (equal out ref)
(if (string-match "^\".*\"$" ref)
(read ref)
(org-babel-ref-resolve ref))
out))
a)))
(org-babel-go-as-list args) " ")) "")))
I encountered an "Invalid function" error when I evaluated results, then I find "if-let" in this code block in file "ob-go.el".I guess "if-let" is invalid in my emacs,so I change it into "let",and it works! Finally I find "if-let" is a macro in new Emacs.