all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* remote plot with local output?
@ 2015-09-14 15:11 Benda Xu
  2015-09-14 16:48 ` Suvayu Ali
  2015-09-14 20:42 ` Charles C. Berry
  0 siblings, 2 replies; 10+ messages in thread
From: Benda Xu @ 2015-09-14 15:11 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-09-18 18:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 15:11 remote plot with local output? Benda Xu
2015-09-14 16:48 ` Suvayu Ali
2015-09-15  8:54   ` Benda Xu
2015-09-15  8:57   ` Benda Xu
2015-09-14 20:42 ` Charles C. Berry
2015-09-15  8:28   ` Benda Xu
2015-09-15 16:19     ` Charles C. Berry
2015-09-16  2:13       ` Benda Xu
2015-09-18  8:58         ` Benda Xu
2015-09-18 18:11           ` Charles C. Berry

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.