emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org b11abb409c 3/3: org-babel-insert-result: Ou


From: ELPA Syncer
Subject: [elpa] externals-release/org b11abb409c 3/3: org-babel-insert-result: Output strings as is for lists of strings
Date: Mon, 26 Dec 2022 04:58:02 -0500 (EST)

branch: externals-release/org
commit b11abb409c2b1f8c733bf6b2766b3b26e2db8ba3
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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 <matt@excalamus.com>
    Link: 
https://orgmode.org/list/1852d9eb52f.c4c534f9581400.7140516675874523594@excalamus.com
---
 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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]