Re: [O] Using tramp to run R source code blocks on remote server

2016-05-09 Thread Benda Xu
Hi Vikas, I cannot address your problem directly. I have a workaround. Vikas Rawal writes: > I am trying to run R source code blocks on a remote server (defined in > my ~/.ssh/config as cesp). > > I am facing several problems. > > 1. The following sample block, when used with ":results value"

Re: [O] export to beamer

2015-11-04 Thread Benda Xu
童俊翔 writes: > I want to export org to beamer. It worked well previously when I press > C-c C-e l O. But in recent days, when I press C-c C-e l, the options > for beamer are missing. I can only export to pdf, not beamer. > > What’s the problem, and what can I do? I found the same issue. Try add

[O] Bug: cached code blocks should return the same value [8.3.1]

2015-09-18 Thread Benda Xu
Hi All, Passing values across code blocks makes Org babel a powerful meta programming language: #+name: input #+BEGIN_SRC sh :results output echo "3" #+END_SRC #+BEGIN_SRC R :var a=input() a #+END_SRC #+RESULTS: | 3 | | | However, this feature does not work with

Re: [O] remote plot with local output?

2015-09-18 Thread Benda Xu
Hi, Benda Xu writes: > "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

Re: [O] Bug: LaTeX export #+NAME failing [8.3.1 (release_8.3.1-123-g823cad @ /home/amdavis/src/org-mode/lisp/)]

2015-09-16 Thread Benda Xu
Hi Andrew, Andrew Davis writes: > Thanks for following up on this with me. I now understand that this is > intentional. Could you just briefly let me know why this is a feature? > I am assuming that this is so that org references are unique should > you accidentally reuse a label? I think you a

[O] Babel python regression org-mode-8 (Was: Bug: babel python indentations fail in sessions [8.3.1])

2015-09-16 Thread Benda Xu
Hi Kyle, Kyle Meyer writes: > Benda Xu writes: >> >> The following code block fails: >> >>#+BEGIN_SRC python :results output :session >> for i in (1, 2): >> pass >> print "hey" >>#+END_SRC >

Re: [O] remote plot with local output?

2015-09-16 Thread Benda Xu
Hi Suvayu, Suvayu Ali writes: > Maybe, you could do all that in your python source block? You could use > the :file header to specify where the plot gets copied to on the local > filesystem. > > WDYT? I did think of putting the logic into python source block. As I will also have R block like

[O] Bug: babel python indentations fail in sessions [8.3.1]

2015-09-16 Thread Benda Xu
Dear All, The following code block fails: #+BEGIN_SRC python :results output :session for i in (1, 2): pass print "hey" #+END_SRC #+RESULTS: : : ... ... File "", line 3 : print "hey" : ^ : SyntaxError: invalid syntax but this works:

Re: [O] remote plot with local output?

2015-09-15 Thread Benda Xu
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)) > (lfi

Re: [O] remote plot with local output?

2015-09-15 Thread Benda Xu
Hi Suvayu, Suvayu Ali writes: > Maybe, you could do all that in your python source block? You could use > the :file header to specify where the plot gets copied to on the local > filesystem. > > WDYT? I did think of putting the logic into python source block. As I will also have R block like

Re: [O] remote plot with local output?

2015-09-15 Thread Benda Xu
Hi Charles, "Charles C. Berry" writes: > Look at the :post header arg > > (info "(org) post") > > You write a src block that extracts the remote file name from *this*, > creates a local file name from it, copies the remote file to the local > host, then substitutes the local file name in *

[O] remote plot with local output?

2015-09-14 Thread Benda Xu
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) p