emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] remote plot with local output?


From: Benda Xu
Subject: [O] remote plot with local output?
Date: Tue, 15 Sep 2015 00:11:03 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Dear All,

I am looking for a way to configure org-babel so that a program runs
remotely and outputs locally.  An example is

  #+NAME: line
   | 1 |
   | 2 |
   | 3 |

  #+BEGIN_SRC python :results file :var dt=line :dir /ipmuap02:/tmp
    from matplotlib import pylab as plt
    plt.plot(dt)
    plt.savefig("line.png")
    return "line.png"
  #+END_SRC

  #+RESULTS:
  [[file:/scp:ipmuap02:/tmp/line.png]]

I would like to embed this figure into my note.  The example above need
to fetch the figure from the remote host on each exportation, which is
very sensitive to the network environment.

I cannot make the plot locally, because (unlike the over-simplified
example) some potentially big data are only available remotely.

My solution is to cache the result (:cache yes), execute the code block,
copy the output file to localhost, update the #+RESULTS link to the
local one, manually.  Now I am facing many such tasks and feel like
automating that.


What is the recommended way for copying the file output from an remote
execution code block back to localhost?


BTW, my org-mode is 8.3.1 and emacs is 24.4.1.

Cheers,
Benda



reply via email to

[Prev in Thread] Current Thread [Next in Thread]