[Top][All Lists]

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

Re: Help debugging R source code block output problem with :session

From: Dylan Schwilk
Subject: Re: Help debugging R source code block output problem with :session
Date: Sat, 29 Aug 2020 23:37:11 -0500
User-agent: mu4e 1.4.3; emacs 26.3

Thanks for the workaround idea of grabbing the results as a string.

I'm not sure why this issue cropped up for me right now when I did not run into it in previous years. But I have run into other :results output issues in the past when ess changed.



On Sat 29 Aug 2020 at 15:35, Berry, Charles <ccberry@health.ucsd.edu> wrote:

This problem has been bugging people for years and previous attempts to solve it have always run up against creating more problems in the process of solving this one.

This workaround gives the same results with or without `:session "NEW"' and same as OPs first src block:

#+header: :prologue "capture.output({" :epilogue "})"
#+begin_src R :results value verbatim :session "NEW" print("<X> <Y> <!>")
print("one <two> three")

If you do decide to dig into solving this, please be sure that remote sessions and graphical outputs are not broken. test-ob-R.el does not cover those cases. In fact, it is pretty short, so there are probably other things that could break without `make test' complaining.



On Aug 29, 2020, at 12:24 AM, Jack Kamm <jackkamm@gmail.com> wrote:

Hi Dylan,

The patch does fix that issue -- but it introduces a different bug for code blocks with ~:session~: the R block now only produces output from the last statement evaluated.

Of course, you're right. Good catch.

Here's another attempt. It fixes the issue by modifying the R comint regular expression, requiring it to match at the beginning of the line.


reply via email to

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