emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] org-babel-script-escape mishandled empty python list


From: Ihor Radchenko
Subject: Re: [BUG] org-babel-script-escape mishandled empty python list
Date: Wed, 12 Oct 2022 19:49:52 +0800

Jonas Bernoulli <jonas@bernoul.li> writes:

> `org-babel-script-escape' doesn't handle an empty python list
> correctly; ['a'] => ("a") but [] => [].
>
> #+name: addheader
> #+header: :var rows=""
> #+begin_src python
>   return []
> #+end_src
>
> #+header: :post addheader(*this*)
> #+begin_src emacs-lisp :results table
>   nil
> #+end_src
> #+RESULTS:
> : []
>
> An empty python list is turned into an empty lisp vector instead of
> an empty lisp list.  At least for python, (> (length str) 2) should
> probably be changed to use >=.

Thanks a lot! A reproducer helps a ton.
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=4c0641837c8570dd8ad7f18c2482411bdc0cda16

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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