[Top][All Lists]

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

Re: [O] R code block produces only partial output

From: Charles C. Berry
Subject: Re: [O] R code block produces only partial output
Date: Mon, 1 Sep 2014 09:08:45 -0700
User-agent: Alpine 2.00 (OSX 1167 2008-08-23)

On Sun, 31 Aug 2014, Aaron Ecay wrote:

Hi Chuck,

Attached is a new version of the patch, including a few more tests.  I
have one question:

2014ko abuztuak 28an, Aaron Ecay-ek idatzi zuen:
but the patch here uses on.exit(file.create(...)) to ensure that that
file is created. One hiccup (not sure if it exists in master,too) is
that starting a remote session and then trying to run src blocks from
a buffer for a local file will hang (because a local temp file is used
for sentinel). So there is still stuff to do.

Hmm, OK.

Can you give a recipe to reproduce this?  Everything seems to work for
me using the following test code, although there is an unexplained ~10s
delay while babel sits in the ‘(while (not (file-exists-p file)) ...)’
loop at the end of ‘org-babel-comint-eval-invisibly-and-wait-for-file’.
| #+name: foo
| #+begin_src R :session *foo* :dir /ssh:address@hidden:/home/aecay :results 
|   1+1
| #+end_src
| #+RESULTS: foo
| : [1] 2


I installed your patch.

Two cases:

1) I open a connection to a remote server by opening a directory there.

From *Messages*:

Tramp: Opening connection for berry@<censored> using scpc...

Then start an R session, type 'library(evaluate)', then change to a local buffer with an R src block and C-c C-c, wait a long while then C-g, then change to the *R* buffer and quit the session. I get this in the *R* buffer:

| > > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', | show.error.locations=TRUE)
| > library(evaluate)
| >
| + + + + . + + + Error in file(file, ifelse(append, "a", "w")) (from #3) :
|   cannot open the connection
| In addition: Warning message:
| In file(file, ifelse(append, "a", "w")) :
| cannot open file | '/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000gn/T/babel-392ywI/R-392jUu': | No such file or directory
| > q()
| Save workspace image? [y/n/c]: n
| Warning message:
| In | file.create("/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000gn/T/babel-392ywI/R-392jUu-sentinel") | : | cannot create file | '/var/folders/kb/2hchpbyj7lb6z76l0q73w_fh0000gn/T/babel-392ywI/R-392jUu-sentinel', | reason 'No such file or directory' | | Process R finished at Mon Sep 1 08:31:19 2014

This worked OK with master.

2) If I modify your 'foo' block to use  :dir /ssh:berry@<censored>/<censored>

and C-c C-c, I get an error message 'Invalid function: 

In the *Messages* buffer, I see:

| Tramp: Decoding region into remote file 
| org-babel-comint-eval-invisibly-and-wait-for-file: Invalid function: 

FWIW, the emacs on that remote system is 22.1.

I thought maybe tramp does some magic that I do not grok, tries to
use the remote emacs and fails. If so, note:

On the remote system

C-h f with-parsed TAB RET shows

| with-parsed-tramp-file-name is a Lisp macro in `tramp.el'.
| ...

so it *does* have that function.




reply via email to

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