emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames
@ 2023-07-14  3:08 ~jackkamm
  2023-07-14  8:57 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: ~jackkamm @ 2023-07-14  3:08 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: yantar92

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames
  2023-07-14  3:08 [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames ~jackkamm
@ 2023-07-14  8:57 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-07-14  8:57 UTC (permalink / raw)
  To: ~jackkamm; +Cc: emacs-orgmode

~jackkamm <jackkamm@git.sr.ht> writes:

> 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/

Thanks!
Applied, onto master.
https://git.sr.ht/~bzg/worg/commit/97d13402

Do you have write access to WORG?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-17 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14  3:08 [PATCH worg] ob-doc-python: Use ":results file link" for returning filenames ~jackkamm
2023-07-14  8:57 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).