From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: R code block produces only partial output Date: Mon, 1 Sep 2014 09:08:45 -0700 Message-ID: References: <87iom8zd24.fsf@gmail.com> <877g2oz9gv.fsf@gmail.com> <87lhr27oap.fsf@gmail.com> <87r40uwavs.fsf@gmail.com> <8761i5kg8f.fsf@gmail.com> <87ppgcrg8n.fsf@gmail.com> <87lhr0qimr.fsf@gmail.com> <87wqa9owhv.fsf@gmail.com> <87oavkp2xa.fsf@gmail.com> <87lhq9tcdj.fsf@gmail.com> <87k35orl2w.fsf@gmail.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1125133766-1409587726=:366" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOUA6-0005uO-4W for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 12:09:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOU9y-00048b-EY for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 12:08:57 -0400 Received: from iport-bcv1-out.ucsd.edu ([132.239.0.119]:37153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOU9x-00048S-VM for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 12:08:50 -0400 In-Reply-To: <87k35orl2w.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Aaron Ecay Cc: emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1125133766-1409587726=:366 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT 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:aecay@foo:/home/aecay :results output > | 1+1 > | #+end_src > | > | #+RESULTS: foo > | : [1] 2 > `---- Aaron, 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@ 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@/ and C-c C-c, I get an error message 'Invalid function: with-parsed-tramp-file-name' In the *Messages* buffer, I see: ,---- | Tramp: Decoding region into remote file /ssh:berry@microb215.med.upenn.edu:/tmp/R-39288P...done | org-babel-comint-eval-invisibly-and-wait-for-file: Invalid function: with-parsed-tramp-file-name `---- 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. ??? HTH, Chuck --0-1125133766-1409587726=:366--