emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org mode R remote code evaluation


From: Alexander Vorobiev
Subject: Re: [O] org mode R remote code evaluation
Date: Wed, 25 Sep 2013 15:36:05 -0500

Michael,

I found that the patch doesn't work for sql code blocks. Here is an example 

* this works
#+BEGIN_SRC sh :results output :dir /grid:
  ls
#+END_SRC

* this doesn't work
#+BEGIN_SRC sql :engine postgresql :dir /grid: :results output
  select 1+2 as three;
#+END_SRC

and here is what appears in *Messages*:

executing Sh code block...
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/ob-input-7928Z4Q...done
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/ob-error-7928zMd...done
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/ob-input-7928Z4Q...done
Wrote /plinkx:grid:/tmp/ob-input-7928Z4Q
Code block evaluation complete.
executing Sql code block...
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/sql-in-7928arv...done
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/sql-out-7928Z_E...done
Tramp: Encoding region using function `base64-encode-region'...done
Tramp: Decoding region into remote file /plinkx:grid:/tmp/sql-in-7928arv...done
psql -A  -F " "  -f "c:/tmp/sql-in-7928arv" -o "c:/tmp/sql-out-7928Z_E" 
-f c:/tmp/sql-in-7928arv -o c:/tmp/sql-out-7928Z_E
No such file or directory 'c:/tmp/sql-in-7928arv'
Tramp: Inserting `/plinkx:grid:/tmp/sql-out-7928Z_E'...
Tramp: Encoding remote file /plinkx:grid:/tmp/sql-out-7928Z_E...done
Tramp: Decoding remote file /plinkx:grid:/tmp/sql-out-7928Z_E with function base64-decode-region...
Wrote c:/Users/avorobi/AppData/Local/Temp/tramp.7928AeX
Tramp: Decoding remote file /plinkx:grid:/tmp/sql-out-7928Z_E with function base64-decode-region...done
Tramp: Inserting `/plinkx:grid:/tmp/sql-out-7928Z_E'...done

So shell commands work but the arguments passed to psql have "c:" at the beginning.

Thanks
Alex



On Wed, Sep 25, 2013 at 2:03 PM, Michael Albinus <address@hidden> wrote:
Eric Schulte <address@hidden> writes:

> I'd rather not hard-code the value of "/tmp/".  Perhaps you could rework
> the patch so that it introduces a new customizable variable (including a
> documentation string) so that users can set the value for their system.

Will do, tomorrow. I would even prefer a more general solution, a new
function which returns a ("the") temp directory on a remote host. This
would be useful also outside org-mode. But this would require changes in
Emacs/Tramp, which won't be applicable for org immediately (backwards
compatibility, and alike).

> If you can keep the patch under 15LOC we can include it w/o requiring
> FSF copyright assignment, otherwise see [1] for contribution details.

No problem. As Tramp maintainer, I have signed the FSF papers for Emacs
10+ years ago. This shall be valid also for org patches.

> Thanks,

Best regards, Michael.


reply via email to

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