浏览代码

org-babel-insert-result: Do not err when inline src block returns nil

* lisp/ob-core.el (org-babel-insert-result): Do not throw error when
src block returns nil or "".

Originally reported in
https://reddit.com/r/orgmode/comments/wy78gi/inline_noweb_or_some_way_to_use_src_block_results/imiw1b0/
Ihor Radchenko 2 年之前
父节点
当前提交
5bb699e0fd
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lisp/ob-core.el

+ 2 - 2
lisp/ob-core.el

@@ -2329,8 +2329,8 @@ INFO may provide the values of these header arguments (in the
       (when inline
 	(let ((warning
 	       (or (and (member "table" result-params) "`:results table'")
-		   (and (listp result) "list result")
-		   (and (string-match-p "\n." result) "multiline result")
+		   (and result (listp result) "list result")
+		   (and result (string-match-p "\n." result) "multiline result")
 		   (and (member "list" result-params) "`:results list'"))))
 	  (when warning
 	    (user-error "Inline error: %s cannot be used" warning))))