From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2Q2aCyXMomRFwAAASxT56A (envelope-from ) for ; Mon, 03 Jul 2023 15:24:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SGyqCiXMomQsWQAA9RJhRA (envelope-from ) for ; Mon, 03 Jul 2023 15:24:53 +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 F13471A57E for ; Mon, 3 Jul 2023 15:24:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=VZFyACZU; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688390693; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=7Yh0VU1u+NIj1T04UBMeysOOTGKRoD7ZydosYKZ1Vq8=; b=VC37UY7RNMFZYSwCpF1aIzpY/82c4p6NfiWt/jyAHRnrPJkNuqAP4VtKeJbcITN1TkFXjY mJ7aJGXvpk7eb3/pThpfLT5GqolkNuu3ZQrhcKKHn38rtjYdcxlvfzu4N/xTaN8BPuFouW vAh0OFdaHG1h4EWA+K2+3doHo3YdJwfMyHUDdp8T27IZpfydDTF9fGwao6G1K606yef7iM mAMSxpqd1w28tQk4W67Wit+UoHSltngTzDbuycQ2ihQ4fsnt5zew02SMbq0xGpfGcmBvlO HTjQXF0mStIEtUqog10f5bBpQg0n/ZMC9SrNFgxw9jeS4KnFWtKW7xz2ImviXQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=VZFyACZU; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688390693; a=rsa-sha256; cv=none; b=gs0YHB5cwdMS2ZMBCTDlODwSpdsNtLIQ81YI8g09mbrsX8WvlE4KpC4IaUTUZ5fC4jj2Bv pmKFSXIHNca2X60ByM1BZWKRBJplIxcgNkUi+sImK0ENKFX9Hld/Wa5rFN2fymAH4yKPul s2BBPUf4++B0HstSD1r2gxY0x7sZtvPij5+tno5YI6wuolDII77KGhhuIILzuo1D7xbNrN 7xdJZTmxxKbGCnUgzReGyy0Ea5/74MeDKaEmMpkd0/ow5KRjfzOFLibpAwDhfobNzrxLTj s9cpxvEvL4tAOiZFQZp2D7KAqCFdzAxivpqnulAXTr8PwztLcKQmUNIXnxcbSw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGJX6-0007cp-IA; Mon, 03 Jul 2023 09:24:00 -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 1qGJX3-0007bZ-Tr for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 09:23:58 -0400 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGJX2-00007d-8K for emacs-orgmode@gnu.org; Mon, 03 Jul 2023 09:23:57 -0400 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3a04e5baffcso3415917b6e.3 for ; Mon, 03 Jul 2023 06:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688390635; x=1690982635; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7Yh0VU1u+NIj1T04UBMeysOOTGKRoD7ZydosYKZ1Vq8=; b=VZFyACZUhK3uDiCkvbaEs0rt49We3DDG2yZ9rFfqqxh9zLak961KmNSI2GbhwRHC18 UU9hpncupsSH72qDAhPKO22xue1PJ+kcYWwJbatMRH0plS6myJ3O/CGbtUbRlr1sVUvn ZWCMcaESF5+oID8xGV2BDNjM2b0hRfo8mpMKl3OZXGeg0u+jyxKLmKlhuRoIfT82BrNO kwq1eanBI3BuWgYpOIO8IpG3a5gvty+XAXQ0tU6jIQPZ1pApsGvHXqE9t7Z4TJ/ASPvB 5llSmjht7HUQEr4dYrQc6WAb56K77PRXebu8qKTfKa/+iSAvP9YohYOBzSnvyPFxc3jw w+XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688390635; x=1690982635; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Yh0VU1u+NIj1T04UBMeysOOTGKRoD7ZydosYKZ1Vq8=; b=GOaoJA2eAmK+iJJ6A78sTGTH5jhLCNqLPywSEQ1mZe/hKzWY4zwjl7RgXyY5JpTdGu uzyir9z+N/Ya7Yadw0TcBw1SgpN+XKWgJc9WiCZee5xUtDceOK5DrCQvhSuDM35dpReg pib3xlI7J/Rri49fjj+s0m+qcyvxlSsL+iXx1u+rBeD0a3LVifpOibTCN7KfxQmhFxBY iDaYd7jV9NJfqoOa7/HXSi/SaWFJv4QBtkiLBxgFiJDF40T72NGgYkydT2HDdJgWo7dG hYgCUzK/sLMFAHvcDZVJ9FFhDOBjCdqOAbB7hqL/B43sTaq3Sommby6qsHa4mfaprlTc B5AA== X-Gm-Message-State: AC+VfDx2mfLxpJROfLHhwJon20l2Ir1pil7keZ0yCE2wZYfjQmednY2e kGT/BZy9lbkZpdfh/dX4RlJsOcZIXcV+CCrbSZE78S7WdVQ5rw== X-Google-Smtp-Source: ACHHUZ6ujGxpPjd8QoLf2hCBxTTYReIZfhTyE2PImLS3q2BZjwR8srfFiqYZPRefGtBlbi77BRRBXm0xWt93dPZMhjE= X-Received: by 2002:aca:d03:0:b0:39e:7af4:7eea with SMTP id 3-20020aca0d03000000b0039e7af47eeamr8758381oin.55.1688390635167; Mon, 03 Jul 2023 06:23:55 -0700 (PDT) MIME-Version: 1.0 References: <877crh8htb.fsf@localhost> <875y71fcic.fsf@localhost> In-Reply-To: <875y71fcic.fsf@localhost> From: Liu Hui Date: Mon, 3 Jul 2023 21:23:43 +0800 Message-ID: Subject: Re: [PATCH] ob-python: support header argument `:results file graphics' To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=liuhui1610@gmail.com; helo=mail-oi1-x22e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: scn0.migadu.com X-Migadu-Spam-Score: -8.23 X-Spam-Score: -8.23 X-Migadu-Queue-Id: F13471A57E X-TUID: BEvjfuEy5HUi Ihor Radchenko =E4=BA=8E2023=E5=B9=B47=E6=9C=883=E6= =97=A5=E5=91=A8=E4=B8=80 19:41=E5=86=99=E9=81=93=EF=BC=9A > This already works, even without the patch. Yes. It means the patch doesn't break current usage. > > In this case, `graphics' can be removed too. > > May you elaborate? > > #+begin_src python :results file > implies that the result of execution is file _contents_. It is consistent with current behavior, e.g. `:results file' is used to produce graphics file https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html > This is not acceptable. If src blocks worked in the past, they should > continue working without adjustments in user' setup. We can only break > backwards-compatibility when there is a strong reason to do so. Adding a > new feature is not such a reason. Any src blocks worked in the past still work with this patch, without any adjustments. The patch only makes the following src block, which cannot produce `test.png' in the past, can produce `test.png'. #+begin_src python :file "test.png" :results graphics file import matplotlib.pyplot as plt plt.plot([1,2,3,4,5]) #+end_src