From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benda Xu Subject: Re: remote plot with local output? Date: Wed, 16 Sep 2015 11:13:12 +0900 Message-ID: <87mvwn862v.fsf@gentoo.org> References: <87bnd5gho8.fsf@gentoo.org> <871te0cchw.fsf@gentoo.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zc2Gt-0004eE-5d for emacs-orgmode@gnu.org; Tue, 15 Sep 2015 22:16:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zc2Gp-000212-5n for emacs-orgmode@gnu.org; Tue, 15 Sep 2015 22:16:31 -0400 Received: from smtp.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:42742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zc2Go-0001sz-QL for emacs-orgmode@gnu.org; Tue, 15 Sep 2015 22:16:27 -0400 Received: from germanium (kmvpn.icrr.u-tokyo.ac.jp [157.82.231.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: heroxbd) by smtp.gentoo.org (Postfix) with ESMTPSA id 3A0B2340C4B for ; Wed, 16 Sep 2015 02:16:21 +0000 (UTC) In-Reply-To: (Charles C. Berry's message of "Tue, 15 Sep 2015 09:19:04 -0700") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Charles, "Charles C. Berry" writes: > Untested, but try this : > > #+name: localize > #+BEGIN_SRC emacs-lisp :var file="" srcinfo=(org-babel-get-src-block-info) > (let* ((dir (cdr (assoc :dir (nth 2 srcinfo)))) > (rfile (concat (file-name-as-directory dir) file)) > (lfile (car (last (split-string rfile ":"))))) > (copy-file rfile lfile 1) > lfile) > #+END_SRC > > then use > > #+HEADER: :post localize(*this*) > > in your python src block. It successfully extracts the :dir field. Thanks! Cheers, Benda