branch: externals-release/org
commit b11abb409c2b1f8c733bf6b2766b3b26e2db8ba3
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
org-babel-insert-result: Output strings as is for lists of strings
* lisp/ob-core.el (org-babel-insert-result): Do not use %S format for
lists of strings in :results list output. This is more consistent
with single string output.
Reported-by: Matt <[email protected]>
Link:
https://orgmode.org/list/[email protected]
---
lisp/ob-core.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index c2a3673752..300c9d92f8 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2461,13 +2461,18 @@ INFO may provide the values of these header arguments
(in the
(insert
(org-trim
(org-list-to-org
+ ;; We arbitrarily choose to format non-strings
+ ;; as %S.
(cons 'unordered
(mapcar
(lambda (e)
(cond
((stringp e) (list e))
((listp e)
- (mapcar (lambda (x) (format "%S" x)) e))
+ (mapcar
+ (lambda (x)
+ (if (stringp x) x (format "%S" x)))
+ e))
(t (list (format "%S" e)))))
(if (listp result) result
(split-string result "\n" t))))