From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Output result of source block to a file Date: Wed, 05 Jun 2019 15:33:15 +0200 Message-ID: <871s08dun8.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYW2b-0000My-KK for emacs-orgmode@gnu.org; Wed, 05 Jun 2019 09:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYW2a-0001ic-Ks for emacs-orgmode@gnu.org; Wed, 05 Jun 2019 09:33:21 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:38683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYW2a-0001fU-Aa for emacs-orgmode@gnu.org; Wed, 05 Jun 2019 09:33:20 -0400 Received: by mail-lf1-x133.google.com with SMTP id b11so19099631lfa.5 for ; Wed, 05 Jun 2019 06:33:20 -0700 (PDT) In-reply-to: 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: Roger Mason Cc: Org-Mode On 2019-06-05 at 12:41 +02, Roger Mason wrote... > 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. > > Here is the code: > > #+begin_src python :results value file :file scaleplot02.pdf :exports results :var data=test > print ("[[./%s]]" % file) > #+end_src What about :var file="scaleplot02.pdf". -k.