From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: Re: Output result of source block to a file Date: Thu, 06 Jun 2019 09:06:31 -0230 Message-ID: References: <877ea041ee.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqhM-0003bu-LX for emacs-orgmode@gnu.org; Thu, 06 Jun 2019 07:36:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYqhH-0004Gk-7B for emacs-orgmode@gnu.org; Thu, 06 Jun 2019 07:36:47 -0400 Received: from esa01.ucs.mun.ca ([134.153.136.21]:25254) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYqhD-00049Z-B3 for emacs-orgmode@gnu.org; Thu, 06 Jun 2019 07:36:41 -0400 In-reply-to: <877ea041ee.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: numbchild@gmail.com Cc: emacs-orgmode@gnu.org Hello, stardiviner writes: > Roger Mason writes: > >> Hello, >> >> I want to output the result of the evaluation of a (python) source block >> to a (graphics) file and have a link to the file inserted in the buffer. >> #+begin_src python :results value file :file scaleplot02.pdf :exports results :var data=test ...snip... >> plt.savefig(file) >> print ("[[./%s]]" % file) >> #+end_src > For this, you should try updated header arguments like ":results graphics link" > or ":results file link". Thanks for your reply. The current incarnation: #+begin_src python :results graphics link :exports results :var data=test :var file="scaleplot2.pdf" The output: #+RESULTS: scaleplot02 : None I'm guessing I have the syntax wrong. Is it documented somewhere? I'm on Org mode version 9.1.13 (release_9.1.13-784-ged7d1d @ /home/rmason/.emacs.d/org-git/lisp/). Cheers, Roger