[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] remote plot with local output?
From: |
Benda Xu |
Subject: |
Re: [O] remote plot with local output? |
Date: |
Wed, 16 Sep 2015 11:13:12 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Hi Charles,
"Charles C. Berry" <address@hidden> 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