From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MEIdBydc4mSOWAAASxT56A (envelope-from ) for ; Sun, 20 Aug 2023 20:32:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oJk8Bydc4mTJXgAA9RJhRA (envelope-from ) for ; Sun, 20 Aug 2023 20:32:07 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CE0DE4E26A for ; Sun, 20 Aug 2023 20:32:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=d+CSc6iq; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692556326; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=k40Ot6R/upEc1M5sc6yaSnD2sch47KDnBuGc6OcmYsk=; b=MJb2ql8wpqTM1yvU0/ktBKa2owc1gMDwOYWxHkHSX/Ldy67sv0wrDahMJLaC8s7HLSWcBQ A70wNm/7qgz94w1j2JNFRa5BwpeEZInmO4n15oXFOcHeoLdxdlwAMtmNqPAz2nkgI+euGW 6+zh1DTyjh9AahOiMcweTgjqtUA1/vjo79rXb4ezAPtwtrbYkV96FdXtPzmaIPi73ZwNCe 8ih0Wd7WO6KNJU7Pam8EPMunaBZ/xOhHNS+etypt/yhMWqoo4Cgzk/3ANPHl4xEf9fT5Yi etv9nAtT4YVGmsEsxMyX1/qBlfJCIGwRtOJkvp52iPVRJpqcM4PD6hdx+jFIcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=d+CSc6iq; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692556326; a=rsa-sha256; cv=none; b=gGwluw6Fwy9dUFg9me5lsmlsTELyBGJ0NdvxdMWvlNwZkD8gqki2zD1NFp2oIw7jwxCcaC HK3RkN+wInSS3ikAEvJmPF0duNg4fSYs+hkQj1WHlFqa7FtkIFdAS20+VVG2Vx035224kR gE2M4Pz+unq8cVEnKFcWihjiuA9OCChqr/U+xa/UQNh+1luplvKki0LywMq5gQoPbbHQ5T Z/Fadwm5nU3UCQd4KTdOK0rjDk1tIL2S+irPycNAgVYVVBkpjFmF2BhJRGyIxVBBb6wudF 7knQsOjx5DnaoaJPXioE7AVDrnHSvdX9e0OUQOY+PV8xJKPtdBRKFHtoHN+GoQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXnD0-0001OH-Lp; Sun, 20 Aug 2023 14:31:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXnCy-0001O9-T0 for emacs-orgmode@gnu.org; Sun, 20 Aug 2023 14:31:28 -0400 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qXnCv-00071t-SM for emacs-orgmode@gnu.org; Sun, 20 Aug 2023 14:31:28 -0400 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3a85c5854deso109539b6e.0 for ; Sun, 20 Aug 2023 11:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692556284; x=1693161084; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=k40Ot6R/upEc1M5sc6yaSnD2sch47KDnBuGc6OcmYsk=; b=d+CSc6iqqVDnvgG8W8d+MOppXxVaLMUS6K2aftiEVYgojp4fdSPNiTDBu3vhPK28Hx C+YtDMXS1z3WS1az8w1g7FQN/kESdAYSzVKy9OccAvDq0Jtp1LyBH0CZUaIHuZvQxl2p EnosbH9jyjZYzkTdizpRB6sINPwSAxsUqlsfGqjnC3h3kYo7IYHVRuIe9D3IFCT9SvHQ 6ns1WLhIFEfUjEzyN1H6EUxOuW0S9KAD/DcVY8uRZDHZt+hIuRijrCyJbfnWJRUwcr9O Am/Ot2gmSxDCmJaXiVW07d6ifcYk6vpdKH4rAvAOjcHS+WPms/kyE2b7QydthqQxrHV8 XaFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692556284; x=1693161084; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k40Ot6R/upEc1M5sc6yaSnD2sch47KDnBuGc6OcmYsk=; b=L0k9YI3VEUYaQGZvH79CvBq3t9AQNkvLXGnYjRte28+8oW7NCtGEdoHJWoq/qgCvRo Q3Bg4Q9oOCInwJfnNapVbrLZNeBMHSCCzVLn/YvHxKl+/mOqvxsHcvwdd7XkzjJIfJ9Y dHSJWJ3aRHanpCIkgJ5dQSaf2bhulSU1Vt2p9hF3Ue0D8BJMWtTcRtpZnGtjic+5KTeM OvV43F4M+ZgzS17Cyx6WQpRSoZV6T7n68EKCdm+EegM/qoKuAIfZ4TsK23+qnakZThxs 7LSwwaa7dNwv4miVywDzb8lGTDbxZN3bXnMLw26jNpMMaAvEB0TJHMxv1lFs1TPhUKVu asPw== X-Gm-Message-State: AOJu0YxWXdSzOhJ2ODeXI5pumGswZnTx++eaiXSJliffoGjxesabSNwP v1VTX/kA9Ipv1AIrAes+GDA= X-Google-Smtp-Source: AGHT+IHsUTjXr893VaJR3Xx82GM1kYIFZEM4LdH0yfUfqIzzno8F9uVFtxB5cqpi/ZYyvyVbx2V7XQ== X-Received: by 2002:a05:6808:2219:b0:3a7:540f:ca96 with SMTP id bd25-20020a056808221900b003a7540fca96mr7271093oib.4.1692556284582; Sun, 20 Aug 2023 11:31:24 -0700 (PDT) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id j4-20020aa783c4000000b0068892c40253sm4690955pfn.216.2023.08.20.11.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Aug 2023 11:31:24 -0700 (PDT) From: Jack Kamm To: Liu Hui Cc: emacs-orgmode@gnu.org, Ihor Radchenko Subject: Re: [PATCH] ob-python results handling for dicts, dataframes, arrays, and plots In-Reply-To: References: <87a5ur6f7w.fsf@gmail.com> <87edk0aqy5.fsf@gmail.com> Date: Sun, 20 Aug 2023 11:31:23 -0700 Message-ID: <87ttsta7lw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=jackkamm@gmail.com; helo=mail-oi1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -9.33 X-Spam-Score: -9.33 X-Migadu-Queue-Id: CE0DE4E26A X-TUID: /axtiK00LjZQ Liu Hui 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.