This is an awesome project. I tried running Haskell and Elixir kernels with success -- thank you.
Is it possible to get the babel source blocks to behave properly for non-Python kernels? org-src-lang-modes lists ("ipython" . python); I'm not sure if there's a way to put a function there that would lookup the :kernel header param. Or maybe some entirely different approach? org-src.el and ob-core.el seems to handle all the logic that's problematic.
As far as I can tell, org-edit-src-code (what org-edit-special calls) fails when it in-turn calls org-babel-get-src-block-info, which fails on apply #'org-babel-merge-params :
(apply #'org-babel-merge-params
(if inline org-babel-default-inline-header-args
org-babel-default-header-args)
(and (boundp lang-headers) (eval lang-headers t))
(append
;; If DATUM is provided, make sure we get node
;; properties applicable to its location within
;; the document.
(org-with-point-at (org-element-property :begin datum)
(org-babel-params-from-properties lang))
(mapcar #'org-babel-parse-header-arguments
(cons (org-element-property :parameters datum)
(org-element-property :header datum)))))
The above results in "Wrong type argument: stringp". At first I thought this was because of nils: the append produces
Those particular nils come from (org-babel-params-from-properties lang), ie (nil nil). However, the same occurs when the block's kernel is python with no issues.
The problem appears in org-babel-merge-params:
(`(:results . ,value)
(setq results (funcall merge
results-exclusive-groups
results
(split-string
(if (stringp value) value (eval value t))))))
but I'm not sure quite where in the function; my elisp-foo isn't sufficient to understand what's going on. The description of the function is
"Combine all parameter association lists in PLISTS.
Later elements of PLISTS override the values of previous elements.
This takes into account some special considerations for certain
parameters when merging lists."
This is an awesome project. I tried running Haskell and Elixir kernels with success -- thank you.
Is it possible to get the babel source blocks to behave properly for non-Python kernels?
org-src-lang-modes
lists("ipython" . python)
; I'm not sure if there's a way to put a function there that would lookup the:kernel
header param. Or maybe some entirely different approach? org-src.el and ob-core.el seems to handle all the logic that's problematic.As far as I can tell,
org-edit-src-code
(what org-edit-special calls) fails when it in-turn callsorg-babel-get-src-block-info
, which fails onapply #'org-babel-merge-params
:The above results in
"Wrong type argument: stringp"
. At first I thought this was because ofnil
s: theappend
produces(nil nil ((:session) (:kernel . "haskell") (:results) (:header . "haskell")))
.Those particular
nil
s come from(org-babel-params-from-properties lang)
, ie(nil nil)
. However, the same occurs when the block's kernel ispython
with no issues.The problem appears in
org-babel-merge-params
:but I'm not sure quite where in the function; my elisp-foo isn't sufficient to understand what's going on. The description of the function is