branch: externals/org
commit 16dc9029366c5c21875cfbace2482e0cb0640646
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
org-babel-merge-params: Not not err on empty :var
* lisp/ob-core.el (org-babel-merge-params): When src block has :var
without actual assignments, simply ignore it instead of failing.
Empty vars are not really defying Org syntax, so failing is a bug,
which also manifests with org-eldoc (from org-contrib).
---
lisp/ob-core.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 7d0e893529..a8ca1ccd08 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3073,6 +3073,8 @@ parameters when merging lists."
(setf (cddr (nth variable-index vars))
(concat (symbol-name name) "=" value))
(cl-incf variable-index)))
+ ((null (cdr pair)) ;; Empty :var, ignore
+ nil)
(t (error "Variable \"%s\" must be assigned a default value"
(cdr pair))))))
(`(:results . ,value)