summaryrefslogtreecommitdiff
path: root/etc/ORG-NEWS
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@posteo.net>2022-11-15 13:52:04 +0800
committerIhor Radchenko <yantar92@posteo.net>2022-11-26 09:51:36 +0800
commitb4e437f968771df9555f9306467846965857f632 (patch)
tree52bddd5351c8cddb129721999f30640b2c83c65a /etc/ORG-NEWS
parentc72d5ee840256ca5d5b2e1b06617bf56c7dc435c (diff)
downloadorg-mode-b4e437f968771df9555f9306467846965857f632.tar.gz
ob-core: Resolve named list references to simple lists
* lisp/ob-core.el (org-babel-read-list): Return a simple list instead of list of lists. Document this in the docstring. * testing/lisp/test-ob-java.el (ob-java/read-return-list): (ob-java/read-list-return-array): (ob-java/read-return-list-with-package): Fix tests assuming previous behavior. * testing/lisp/test-ob.el (test-ob/simple-variable-resolution): Add new tests. * etc/ORG-NEWS (List references in source block variable assignments are now proper lists): Document the change. This commit fixes the broken promise in the manual section 16.4 Environment of a Code Block where the named references to lists should be converted to simple lists consisting of the top-level items. The inconsistency existed for a while and possibly lurked into some third-party packages. So, announcement in NEWS is required. Reported-by: Alain.Cochard@unistra.fr Link: https://orgmode.org/list/87pmdqfao4.fsf@localhost
Diffstat (limited to 'etc/ORG-NEWS')
-rw-r--r--etc/ORG-NEWS34
1 files changed, 34 insertions, 0 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index f9f859b..63ff5d7 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -778,6 +778,40 @@ If you prefer to keep the keybinding, you can add it back to
(define-key org-mode-map (kbd "C-c SPC") #'org-table-blank-field)
#+end_src
+*** List references in source block variable assignments are now proper lists
+
+List representation of named lists is now converted to a simple list
+as promised by the manual section [[info:org#Environment of a Code Block][org#Environment of a Code Block]].
+Previously, it was converted to a list of lists.
+
+Before:
+
+#+begin_src org
+,#+NAME: example-list
+- simple
+ - not
+ - nested
+- list
+
+,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
+(format "%S" x)
+,#+END_SRC
+
+,#+RESULTS:
+: (("simple" (unordered ("not") ("nested"))) ("list"))
+#+end_src
+
+After:
+
+#+begin_src org
+,#+BEGIN_SRC emacs-lisp :var x=example-list :results value
+(format "%S" x)
+,#+END_SRC
+
+,#+RESULTS:
+: ("simple" "list")
+#+end_src
+
** New features
*** New citation engine