emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alexander Vorobiev <alexander.vorobiev@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Loris Bennett <loris.bennett@fu-berlin.de>,
	emacs-orgmode <emacs-orgmode@gnu.org>,
	Johannes Rainer <johannes.rainer@i-med.ac.at>,
	Eric Schulte <schulte.eric@gmail.com>
Subject: Re: org mode R remote code evaluation
Date: Wed, 25 Sep 2013 15:36:05 -0500	[thread overview]
Message-ID: <CAGOCFPVWXXhRTaf11bCWp1vfh+qzWfmxp3f3ODiuhH+-8vkN8g@mail.gmail.com> (raw)
In-Reply-To: <87wqm4yb8w.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 3071 bytes --]

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 <michael.albinus@gmx.de>wrote:

> Eric Schulte <schulte.eric@gmail.com> 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.
>

[-- Attachment #2: Type: text/html, Size: 4277 bytes --]

  reply	other threads:[~2013-09-25 20:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  6:31 org mode R remote code evaluation Johannes Rainer
2013-08-29  8:25 ` Loris Bennett
2013-08-29 10:42   ` Johannes Rainer
2013-09-23 16:45     ` Alexander Vorobiev
2013-09-24 12:57       ` Michael Albinus
2013-09-24 13:21         ` Alexander Vorobiev
2013-09-24 13:25           ` Michael Albinus
     [not found]             ` <CAGOCFPUyTaQzVTSwjUOJBfwF8vUzyw=Gn43+bHs8Go8+RUU+nA@mail.gmail.com>
2013-09-24 18:40               ` Michael Albinus
2013-09-25  4:24                 ` Alexander Vorobiev
2013-09-25 10:44                   ` Michael Albinus
2013-09-25 18:15                     ` Eric Schulte
2013-09-25 19:03                       ` Michael Albinus
2013-09-25 20:36                         ` Alexander Vorobiev [this message]
2013-09-26  8:11                           ` Michael Albinus
     [not found]                             ` <CAGOCFPXj2-3FruuD=K7=H+SQ308dzkH1P=qP0b17xQuoW9MkPQ@mail.gmail.com>
     [not found]                               ` <87mwmzy16d.fsf@gmx.de>
2013-09-26 17:28                                 ` Alexander Vorobiev
2013-09-26 17:43                                   ` Michael Albinus
2013-09-27 11:39                       ` Michael Albinus
2013-09-28 11:41                         ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGOCFPVWXXhRTaf11bCWp1vfh+qzWfmxp3f3ODiuhH+-8vkN8g@mail.gmail.com \
    --to=alexander.vorobiev@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=johannes.rainer@i-med.ac.at \
    --cc=loris.bennett@fu-berlin.de \
    --cc=michael.albinus@gmx.de \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).