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