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/
This commit is contained in:
Ihor Radchenko 2022-09-01 21:15:11 +08:00
parent 09406b1c98
commit 5bb699e0fd
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 2 deletions

View File

@ -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))))