From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ECFYMEIutWQwTQAASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 14:04:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iNb4L0IutWR1oAAAauVa8A (envelope-from ) for ; Mon, 17 Jul 2023 14:04:18 +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 5C8BF5ADEE for ; Mon, 17 Jul 2023 14:04:18 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=sr.ht (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689595458; h=from:from:sender:sender:reply-to: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HbypTA7tVhe96bDcR1/33U9LQw9SVMlYh2rypYr3ydg=; b=bekTg0bzuv7yIzy0Jmrs6sLopqe1ADtigjKeYuDLgBnY42mG8hAp7H4CVLwCQppGiFc5jq HxFNbzTaOY43ZczRIF1mcjqyPzaEsYGEu81xdNppjypM5ZMiiGHJHlc/DaqAX94VtGipXX Z34q1RY3v2O6o68bokbyIblWW2CVVnasdmdKydpNumXOdFRQPqZsUcNuL8LCftOr5HqSDQ Y/efMKM9joJ/ydhgjlQt5gAnb+IK3rmoIPmMTScR86FyWMIOIoZp0hTdHoMHN5wcxkWkOW SaeLKZsyt2DkCH9yhIUFtw5+iGYrAeEgpEZXAeDhFFZEVxOGuwRqTbBmjLMocg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=sr.ht (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689595458; a=rsa-sha256; cv=none; b=eHBVVE6rKgAegqjmrrEWiO07X1/UfJo4NdE5unQKWEajxdd5iPHS9RNSlDwEqfPI6e+K/n FMDlKVlAqVI1FIdQWjcXoB2gntSGgP0v+jyGeLv17UlKdXEwwMHZIx3Ji8agnurEILb+GP Hfnf6dJv+gypJiqcXxVKZHMc2mrwERRmhfQs5KBZbxEZdZ0DMEBHtYOUEw8N76vkgLqgnv wD5knyxmEZg2z382i3V9w69NNhT+g9o3R9KTzjRmrG/0rw3Bhq0qtb8ivfhr8AchZsha3O 3k1HXx4lvw3vtx8mQULTY/XWjdnsOXK/cne1NH75JOUC4cxnGLLzlc1Ll1t8wg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLMww-0000Ke-HF; Mon, 17 Jul 2023 08:03:34 -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 1qK9Wp-0002e6-N5 for emacs-orgmode@gnu.org; Thu, 13 Jul 2023 23:31:35 -0400 Received: from mail-b.sr.ht ([173.195.146.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qK9Wn-00064Y-P0 for emacs-orgmode@gnu.org; Thu, 13 Jul 2023 23:31:35 -0400 Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 6481611EEF6; Fri, 14 Jul 2023 03:31:30 +0000 (UTC) From: ~jackkamm Date: Thu, 13 Jul 2023 20:08:22 -0700 Subject: [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames Message-ID: <168930549025.22836.5898372423288499122-0@git.sr.ht> X-Mailer: git.sr.ht To: emacs-orgmode@gnu.org Cc: yantar92@posteo.net Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=173.195.146.151; envelope-from=outgoing@sr.ht; helo=mail-b.sr.ht X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_REPLYTO=2.095, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 17 Jul 2023 08:03:31 -0400 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: , Reply-To: ~jackkamm 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: mx0.migadu.com X-Migadu-Queue-Id: 5C8BF5ADEE X-Migadu-Spam-Score: -5.04 X-Spam-Score: -5.04 X-TUID: SKN99gkvNltR From: Jack Kamm The correct usage for returng filenames as paths is to use the link header arg. This updates the ob-doc-python examples to follow this convention now. See also: https://list.orgmode.org/87ttu95xst.fsf@localhost/ --- org-contrib/babel/languages/ob-doc-python.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org-contrib/babel/languages/ob-doc-python.org b/org-contrib/babe= l/languages/ob-doc-python.org index 7ee29be5..1012ba56 100644 --- a/org-contrib/babel/languages/ob-doc-python.org +++ b/org-contrib/babel/languages/ob-doc-python.org @@ -190,12 +190,12 @@ ret ** Graphics =20 To return plots, save the figure to a file, return the filename, and -set the header argument =3D:results file=3D. +set the header argument =3D:results file link=3D. =20 For example: =20 #+begin_example -#+begin_src python :session :results file +#+begin_src python :session :results file link import matplotlib import matplotlib.pyplot as plt fig=3Dplt.figure(figsize=3D(3,2)) @@ -244,7 +244,7 @@ syntax, but to hide the inserted code during export. ,#+end_src =20 ,#+header: :noweb strip-export -,#+begin_src python :results value file :session :exports both +,#+begin_src python :results value file link :session :exports both import matplotlib, numpy import matplotlib.pyplot as plt fig=3Dplt.figure(figsize=3D(4,2)) @@ -327,7 +327,7 @@ return(data[val]) =20 - Plotting #+begin_example -#+begin_src python :results file +#+begin_src python :results file link import matplotlib, numpy matplotlib.use('Agg') import matplotlib.pyplot as plt --=20 2.38.5