From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UGrCMqj+pGSBDgAASxT56A (envelope-from ) for ; Wed, 05 Jul 2023 07:24:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UKN6Mqj+pGQiwQAAauVa8A (envelope-from ) for ; Wed, 05 Jul 2023 07:24:56 +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 71DD7A990 for ; Wed, 5 Jul 2023 07:24:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGuzl-0000Qb-5g; Wed, 05 Jul 2023 01:24:05 -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 1qGuzj-0000QQ-Cv for emacs-orgmode@gnu.org; Wed, 05 Jul 2023 01:24:03 -0400 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGuzh-0002gN-Ei for emacs-orgmode@gnu.org; Wed, 05 Jul 2023 01:24:03 -0400 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-392116b8f31so4466422b6e.2 for ; Tue, 04 Jul 2023 22:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688534640; x=1691126640; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+dV5s3q9srrRPiMy9+H4XO41G8IEkGr6bWJNGkYIaGg=; b=jEog804MyhTBqiBusSU7fRYm5cEcMXwd6w3O6YjMUuwrmVU5jcDi06XS9LJt0slWNM BqaFhf7LRdV+cwdrYMUH2QxN8At0ezn5Uv121mYAoPhjlageJNJh0QjCBtccUA1TqgiE 45xmCaLi3IlZQr0j+491Q+kprpFb41pa1S08GLKja9nkQAxYR6Ej8uMcWqCvcgeN+DUT iCVob5JeHFjRYP9UG7PJBMVDvAKGLQh7ThdxMr8UdwH5L8JNjbNyxWvpxZiWQZmLXqOE Lhujux45ZubzzcR7vGFb2FtcCaZc5UmPzd8FBS8pWGsYEf67rXLQiCrWlkEpAYfemYi9 j0Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688534640; x=1691126640; 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=+dV5s3q9srrRPiMy9+H4XO41G8IEkGr6bWJNGkYIaGg=; b=BWe5HUWQegyOagtMIfJ56WHpowzNwkif2LcwmtmzpQHVlgzgtDAksihyn5uEXHNzPB 27TkRWryxjeKg+5TxdOT8ZUHKN6Ro5FT3WOuTTJTOeuNFEAHQZOPy6cA85e7uNQ9Hf5b 8yLK0xexIuvvXZMVICTAEOCbvorRrYyDq1mQuW/BTism0KwjFvK+xlo/pTC5XSYnfcS+ oi/wg3Bo7zROkr0jh+J1QhQr7EvPxIGUmMKVYKIDy+qT+Q2CauSpeUpXNE7yj0a6zXVZ gFBaigDKQx16nwZb5jCSuxLi/wx+8gS/g984ad3tfYvGOFKCHes134XUTCmfM9wLLOCm 09iw== X-Gm-Message-State: AC+VfDwNOc+YMmTwArDI4MmlHthxVZQuvsbV+HosAeqd8Xw/joeW9pud IikAkjXus/+0K8xI/tSq9OjFTfnZOpk= X-Google-Smtp-Source: ACHHUZ5Vs4TPROi48XupjasWVZxaTa6waTDpmLQRGAHhI/sq06YFTu7kyWelup2MBhWFzgpJQF0+XQ== X-Received: by 2002:a05:6808:1295:b0:3a1:ee4b:b8ee with SMTP id a21-20020a056808129500b003a1ee4bb8eemr20855044oiw.53.1688534640118; Tue, 04 Jul 2023 22:24:00 -0700 (PDT) Received: from localhost (157-131-78-143.fiber.dynamic.sonic.net. [157.131.78.143]) by smtp.gmail.com with ESMTPSA id b9-20020a170902a9c900b001b8ab115ce4sm1019416plr.278.2023.07.04.22.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 22:23:59 -0700 (PDT) From: Jack Kamm To: Ihor Radchenko , Liu Hui Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] ob-python: support header argument `:results file graphics' In-Reply-To: <877crfvrsf.fsf@localhost> References: <877crh8htb.fsf@localhost> <875y71fcic.fsf@localhost> <877crfvrsf.fsf@localhost> Date: Tue, 04 Jul 2023 22:23:58 -0700 Message-ID: <87v8ez0w41.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=jackkamm@gmail.com; helo=mail-oi1-x230.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, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688534696; a=rsa-sha256; cv=none; b=IKcL0+z/hk2TgM/grKDBLYUoG65EGT3tcr7x8LsiAGbcfZ/pDiZxpTLkPkMJ8H7w8w3RyJ vO1y7yi335gS2H5BROu3qU9GoxRnmOBHwsHIg5krTSxJJevnJiaH6kcnzdecbfYL2S718u oHY1hxSvVrrj4S5Rk9k4A7Y290qBFk5HsGQMugaqJsDmKkU+M7qApF/nocaUcbafNo0YhW MUWWBVcQ9rUZIaSMRxo4FIRnp9n4aZ/kQ5NPDzCIkecaX01ic1woNVyjkqE9OL3neymt4K rJ6mlflRpQWBuk59FzbV0H5OeTTHkcd+US8MpMJgVGaAXl/nZySLbgEVB6HKkg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=jEog804M; 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=1688534696; 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=+dV5s3q9srrRPiMy9+H4XO41G8IEkGr6bWJNGkYIaGg=; b=SW2n95rXcw9VOd/2+emPTCHEfxLC5vDWfmyWPAhb0In7xl6+VwKlxEqfEPMDmKr5bwHDoL 9DZZvRj9n2yCo1TXgcyerlwNSXw150UNAjaCis2UBGQ3v+2x73DnFtF3ZLbaZwmEAjVYlQ LnJq4CZp05mGfVl15ez1EAMJnYMQUtjoUsXmMlg2H7dkk6NwJrSuH+gVuEpZjsvBTwOf5S WPmsaq3wjKjPFdeEaK60KAcmPSvJylY6srueb627yFB9a2r5oR1zp04bXWg68WpWiuBUtH DcqjfRjdsfXSlPOhoE47lNKgfKpHWgxW3asSqh3m1zmsDGfkwZOqguloA+defA== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=jEog804M; 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" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.73 X-Spam-Score: -8.73 X-Migadu-Queue-Id: 71DD7A990 X-TUID: zKt8L9vhe2IO Ihor Radchenko writes: > WORG documentation is not accurate here. > > If the block has :file parameter _or_ :file-exp parameter and #+name, > the results of evaluation are inserted into a file. Otherwise, results > of evaluation are interpreted as file name--*undocumented*. > > That said, your patch should still work fine even with these > considerations. But we may need to sort out this undocumented behaviour. > Probably, an error like in `org-babel-graphical-output-file' should be > thrown by `org-babel-generate-file-param'. I think the Worg documentation is accurately describing the behavior of ob-python -- it's just that ob-python uses ":results file" in a nonstandard way. But I'm hesitant to make a breaking change to ob-python on this. Until now it has been the only way for ob-python to return a plot. And the matplotlib example in Worg has been there for 10 years, long before I started maintaining ob-python.