From: Jack Kamm <jackkamm@gmail.com>
To: Liu Hui <liuhui1610@gmail.com>
Cc: emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@posteo.net>
Subject: Re: [PATCH] ob-python results handling for dicts, dataframes, arrays, and plots
Date: Tue, 22 Aug 2023 16:44:05 -0700 [thread overview]
Message-ID: <87lee2abi2.fsf@gmail.com> (raw)
In-Reply-To: <87ttsta7lw.fsf@gmail.com>
Jack Kamm <jackkamm@gmail.com> writes:
> Liu Hui <liuhui1610@gmail.com> writes:
>
>> I think these objects need to be shown in a single column rather than
>> two. Besides, if the python code becomes too complex finally, I think
>> maintaining the python code outside the ob-python.el, as suggested by
>> Ihor, is a good idea.
>
> Thanks for reporting these misbehaving examples. I think the root of the
> problem is `org-babel-script-escape', which is too aggressive in
> recursively converting strings to lists. We may need to rewrite our own
> implementation for ob-python.
>
> Also, I agree that moving the python code to an external file will be
> helpful in handling these more complex cases.
>
> I may leave these tasks for future patches. In the meantime, we may have
> to recommend ":results verbatim" for these more complex cases that
> ":results table" doesn't fully handle yet.
Pushed the patch now, with one final change: I decided to leave dict as
string by default, converting to table only when ":results table" is
explicitly set. I think it's better this way for now, because of the
misbehaving examples you pointed out -- table conversion is not yet
fully robust for complex dict's containing complicated objects or
structures.
next prev parent reply other threads:[~2023-08-22 23:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 23:46 [PATCH] ob-python results handling for dicts, dataframes, arrays, and plots Jack Kamm
2023-08-16 9:32 ` Ihor Radchenko
2023-08-17 4:04 ` Jack Kamm
2023-08-17 9:14 ` gerard.vermeulen
2023-08-17 12:10 ` Ihor Radchenko
2023-08-18 4:37 ` gerard.vermeulen
2023-08-18 6:01 ` gerard.vermeulen
2023-08-18 23:30 ` Jack Kamm
2023-08-19 8:50 ` Ihor Radchenko
2023-08-20 18:01 ` Jack Kamm
2023-08-20 18:21 ` Ihor Radchenko
2023-08-19 8:58 ` Ihor Radchenko
2023-08-20 18:13 ` Jack Kamm
2023-08-20 18:25 ` Ihor Radchenko
2023-08-22 23:37 ` Jack Kamm
2023-08-17 12:07 ` Ihor Radchenko
2023-08-18 22:49 ` Jack Kamm
2023-08-17 5:35 ` Liu Hui
2023-08-18 23:09 ` Jack Kamm
2023-08-20 12:13 ` Liu Hui
2023-08-20 18:31 ` Jack Kamm
2023-08-21 6:21 ` Liu Hui
2023-08-22 23:44 ` Jack Kamm [this message]
2023-08-17 11:57 ` Ihor Radchenko
2023-08-18 23:18 ` Jack Kamm
2023-08-19 8:54 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lee2abi2.fsf@gmail.com \
--to=jackkamm@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=liuhui1610@gmail.com \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.