|
| From: | Jack Kamm |
| Subject: | Re: [PATCH] ob-python results handling for dicts, dataframes, arrays, and plots |
| Date: | Fri, 18 Aug 2023 15:49:26 -0700 |
Ihor Radchenko <yantar92@posteo.net> writes:
>>> #+begin_src python :results list
>>> return {"a": 1, "b": 2}
>>> #+end_src
>>>
>>> #+RESULTS:
>>> - a :: 1
>>> - b :: 2
>>
>> This seems harder, and may require more widespread changes beyond
>> ob-python. In particular, I think we'd need to change
>> `org-babel-insert-result' so that it can call `org-list-to-org' with a
>> list of type "descriptive" instead of "unordered" here:
>
> Actually, (org-list-to-org '(unordered ("a :: b") ("c :: d")))
> will just work.
>
> We do not support nested lists when transforming output anyway. So,
> unordered/descriptive does not matter in practice.
You're right, thanks for the suggestion.
I've added it now to
https://github.com/jackkamm/org-mode/tree/python-results-revisited-2023
More specifically, here:
https://github.com/jackkamm/org-mode/commit/0440caa3326b867a3a15d5f92a6f99cbf94c14d5
| [Prev in Thread] | Current Thread | [Next in Thread] |