Browse Source

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 years ago
parent
commit
5bb699e0fd
1 changed files with 2 additions and 2 deletions
  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))))