emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Aaron Ecay
Subject: Re: [O] R code block produces only partial output
Date: Thu, 07 Aug 2014 14:06:36 -0400
User-agent: Notmuch/0.18.1+51~gbbbdf04 (http://notmuchmail.org) Emacs/24.4.50.2 (x86_64-unknown-linux-gnu)

Hi Chuck,

Thanks for your feedback.

2014ko abuztuak 7an, "Charles C. Berry"-ek idatzi zuen:
> Hi Aaron,
> 
> I like what you are trying to do, but ...
> 
> 1) The change has at least one bug: Remote sessions are broken by this 
> change.
> 
> 2) The behavior of :results output is modified in ways that might not be 
> desired. i.e. warnings and errors will not show up in the output.
> 
> Can you revert this change until the bugs are sorted out and consensus 
> about the proper handling of cases like '2' is reached?

OK.

> 
> Can I also suggest that in the future before a change is pushed, that the 
> patch is announced so we can try it out or at least eyeball it and discuss
> issues/bugs?

Good idea.

> 
> Details:
> 
> Issue 1) ===========
> 
> If I open a *.org file on a remote machine and C-c C-c on a src block that 
> has `:session :results output', after the usual session startup the src 
> block fails. The session buffer shows this
> 
> ====
> Error in file(file, if (append) "a" else "w") :
>    cannot open the connection
> In addition: Warning message:
> In file(file, if (append) "a" else "w") :
>    cannot open file '/scpc:berry@<DELETED.URL>:/tmp/R-1155xWV': 
> No such file or directory
>> 
> ===
> 
> The file '/tmp/R-1155xWV' was created.
> 
> I think if the tramp file localname is used. it might work. I do not know 
> tramp, but maybe something like
> 
>   (let output-file-localname
>    (if (tramp-tramp-file-p output-file)
>        (tramp-file-name-localname
>         (tramp-dissect-file-name output-file))
>      output-file))
> 
> is good enough.

This looks promising – I’ll work on it.

> 
> 
> Issue 2) ===========
> 
> ECM:
> 
> #+NAME: aa
> #+BEGIN_SRC R :session R2 :results output
> warning("this is a warning")
> 1+1
> #+END_SRC
> 
> #+RESULTS: aa
> : [1] 2
> 
> For some purposes having the warnings in the #+RESULTS: block is helpful.
> 
> And when revising code, having the errors in the #+RESULTS helps - 
> especially if I have to put aside work in progress.

Hmm.  Certainly, the previous behavior should be retained for now.  In
the longer term, I’d like to see a system whereby R errors trigger elisp
errors.  This is so that the execution of a whole document (subtree,
etc.) will be halted by the first error, rather than continuing what may
be a long series of commands that will not give valid output.  What do
you think?

Thanks,

-- 
Aaron Ecay



reply via email to

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