emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH worg] ob-doc-python: Use ":results file link" for returning filen


From: ~jackkamm
Subject: [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames
Date: Thu, 13 Jul 2023 20:08:22 -0700

From: Jack Kamm <jackkamm@gmail.com>

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/babel/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
 
 To return plots, save the figure to a file, return the filename, and
-set the header argument =:results file=.
+set the header argument =:results file link=.
 
 For example:
 
 #+begin_example
-#+begin_src python :session :results file
+#+begin_src python :session :results file link
 import matplotlib
 import matplotlib.pyplot as plt
 fig=plt.figure(figsize=(3,2))
@@ -244,7 +244,7 @@ syntax, but to hide the inserted code during export.
 ,#+end_src
 
 ,#+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=plt.figure(figsize=(4,2))
@@ -327,7 +327,7 @@ return(data[val])
 
   - 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
-- 
2.38.5



reply via email to

[Prev in Thread] Current Thread [Next in Thread]