From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 gD0BLa7132RprAAASxT56A (envelope-from ) for ; Sat, 19 Aug 2023 00:50:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GIMaLK7132QNPgEAG6o9tA (envelope-from ) for ; Sat, 19 Aug 2023 00:50:22 +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 5D1274093E for ; Sat, 19 Aug 2023 00:50:22 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=o5kLsxgX; 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=1692399022; 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=4GkAkTwrQFLeWWHhGe+K2L0ixBV0zqY25rtDJRLXvkc=; b=craXpriQfNBO8kq+83RiTZWm+XAJbZKQ1O1hrXH9Fk1zk/DQQK1+jA3nnrnlkjFyUQyzka 1TTrItff+QU6n5qwYZYgCJxUzMgFBJPdUFCmZlkys+mPbNqxIdwpPJ3vfHMXpEMWlKmgcX QBf6CN6zk7Yk8OWDgnAMCdpKpUQlIgCZFvrfTpY5zMHyIbYPbO5Pvn2B/jS8ZM/lQZ5YAQ oSEdhwYmzavg4DZZ7RkzwAWKcXEKUepIOfnTZYrj5yJCjelLqZJzkbXQhOhopDD2fg5gJW cwjHXllHFRMo3BRo6Wpb8O/ErIatYNkGgXofUNXQn6/UKuI16uJPqz7zk2OD8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=o5kLsxgX; 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=1692399022; a=rsa-sha256; cv=none; b=Hw0x8QRMOq/9gpMVWvJXRiYN/oa+RteTJzbZREpI/stuovsv7yYeFt54hTitpQpBdw+bDj mDsRYgWIkOlzMWMp9auUlsBzg2eePsQI7G/NvAdwe0Jro3OL3Subh4C0CoGciXW/gXmFOx UPVXXih01e9QTz0Hs3ELlM14nzsGsBQoaVUGh9zNHf2RrUJawwTPyTDEr3OQbZMH5YWTKr 6aPKw63B8y2ErTQ5aBCX/0M0M8h11T13HJ7kREdEm4zM8NyQinGDB/PKCq7S3vqfnN5uTI +U52NRHbWiUilbrr4KuQPw4yb/bVl/ZkmrMeeB9BzoiZ6N+YlW5C4G7rYYxkUg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX8Hd-0007P5-Td; Fri, 18 Aug 2023 18:49:33 -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 1qX8Hc-0007Ov-La for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 18:49:32 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX8Ha-0005pF-8B for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 18:49:32 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-26d60e6fc4eso402836a91.1 for ; Fri, 18 Aug 2023 15:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692398968; x=1693003768; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=4GkAkTwrQFLeWWHhGe+K2L0ixBV0zqY25rtDJRLXvkc=; b=o5kLsxgXgU2fObX6X+n9MKprKsbEuida1FLqcB6XrjuSFg1j41tMkOfmRqpkCQ6Juf O2j7Lq5DZoKSnokvsHaNeifWrPIiQahIkPziZirDh0KZ+FTCg9XXMSBAS/1IM1Isr+3e cH5inoTiejzBdW9iXXfG6BopaWzbhqp2oiDabmb0bPudgKlLb49QjApNFpqkF5BZODXl 42vxsjRcescOfb+aJejU/3L2tGSVIleSRgi+XiD1r9Mi+hdOHcs8FMy0ZSyHMEZpqv0M 3/J5wK6BI9NGCfOO5EdsgxD3eB9/9yLJit6rSKisu7y5fr/OuGaZvgYVSDa4mLsy9YSW Q4Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692398968; x=1693003768; 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=4GkAkTwrQFLeWWHhGe+K2L0ixBV0zqY25rtDJRLXvkc=; b=g+LrJSNZpjnitL2JpIRjciTTdoh290Sz5D0loXUGlHqhsrGHO4w8JT58fB7ZSBEhSw zXA1l8+fkCG13YAcayQEtRrfkbk0ZYj6uYNnUYff1YmJ0P9yMbVsKBwoJkic6GJepKb5 JUTJKB3aIAnf47CQHtLmKC5uYHcj0dLzecI3L2I3cf3WO/OoBf0ZOecxPqcx+HAelsWy s6Rd5pfZ/I0p3wFyInjlF2wnJHp6EqdRSgiM5Zk/7j2EU7/2687vN9fUGOv4n3LcFELs DyWBH3DKBUcS1BLOKjQMZYAnwvLpHn+2QyTDm5VbdHY5P1fhLUdiKZncEUdXQS+upd+Q LKNQ== X-Gm-Message-State: AOJu0YzY1ZDvOMCYa3uNWlIlQlN+OziRUbWmE2GFBYhETmZquN89TjaE m0fQ3la96378hmh8+rYfPEEq3NkRK9A= X-Google-Smtp-Source: AGHT+IFb9zwDXR+eFo3QXFgMMcFNFJwyjHOYW9ibMaI6qKoTZ1zewpSoyg6SAGFXEaDgebBfrODQog== X-Received: by 2002:a17:902:da82:b0:1b0:3a74:7fc4 with SMTP id j2-20020a170902da8200b001b03a747fc4mr559383plx.24.1692398967824; Fri, 18 Aug 2023 15:49:27 -0700 (PDT) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id i1-20020a17090332c100b001bf2dcfe352sm2254067plr.234.2023.08.18.15.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 15:49:27 -0700 (PDT) From: Jack Kamm To: Ihor Radchenko Cc: emacs-orgmode@gnu.org, Liu Hui Subject: Re: [PATCH] ob-python results handling for dicts, dataframes, arrays, and plots In-Reply-To: <87a5uprhx7.fsf@localhost> References: <87a5ur6f7w.fsf@gmail.com> <871qg3pc2o.fsf@localhost> <87350i9uwv.fsf@gmail.com> <87a5uprhx7.fsf@localhost> Date: Fri, 18 Aug 2023 15:49:26 -0700 Message-ID: <87h6owarux.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=jackkamm@gmail.com; helo=mail-pj1-x102b.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.30 X-Spam-Score: -9.30 X-Migadu-Queue-Id: 5D1274093E X-TUID: D1+xO1RR9abq Ihor Radchenko 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