* org babel R source blocks :results output with :session includes extra blank lines
@ 2018-08-28 14:48 Dylan Schwilk
2018-08-28 16:57 ` Berry, Charles
0 siblings, 1 reply; 3+ messages in thread
From: Dylan Schwilk @ 2018-08-28 14:48 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I recently have run into a change in output from my R language source code blocks.
I have found that when I include :session to the source block header, I now get
extra blank lines in the #+results. This has broken my lecture slides for my
courses with too much extra blank space.
for example:
#+begin_src R :results output :exports both :session
1 + 2
3 + 4
print("the end")
#+end_src
#+results:
: [1] 3
:
: [1] 7
:
: [1] "the end"
I do not have this issue when I omit the :session header argument, eg:
#+begin_src R :results output :exports both
1 + 2
3 + 4
print("the end")
#+end_src
#+results:
: [1] 3
: [1] 7
: [1] "the end"
I am using org-mode version 9.1.13, emacs 25.2.2 and R version 3.4.4
(2018-03-15) with no .Rprofile.
This does not happen with python source blocks, only with R
Sincerely,
Dylan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org babel R source blocks :results output with :session includes extra blank lines
2018-08-28 14:48 org babel R source blocks :results output with :session includes extra blank lines Dylan Schwilk
@ 2018-08-28 16:57 ` Berry, Charles
2018-08-28 22:24 ` Dylan Schwilk
0 siblings, 1 reply; 3+ messages in thread
From: Berry, Charles @ 2018-08-28 16:57 UTC (permalink / raw)
To: Dylan Schwilk; +Cc: emacs-orgmode@gnu.org
Cannot confirm. See inline.
> On Aug 28, 2018, at 7:48 AM, Dylan Schwilk <dylan@schwilk.org> wrote:
>
> Hello,
>
> I recently have run into a change in output from my R language source code blocks.
>
> I have found that when I include :session to the source block header, I now get
> extra blank lines in the #+results. This has broken my lecture slides for my
> courses with too much extra blank space.
>
> for example:
>
> #+begin_src R :results output :exports both :session
> 1 + 2
> 3 + 4
> print("the end")
> #+end_src
>
> #+results:
> : [1] 3
> :
> : [1] 7
> :
> : [1] "the end"
>
With the :session arg I get the output as you show it below.
This was with master on commit f79545 from last month and on today's master (commit 38a8901).
>
> I do not have this issue when I omit the :session header argument, eg:
>
> #+begin_src R :results output :exports both
> 1 + 2
> 3 + 4
> print("the end")
> #+end_src
>
> #+results:
> : [1] 3
> : [1] 7
> : [1] "the end"
>
>
FWIW, my R session looks like this
--8<---------------cut here---------------start------------->8---
[...]
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> setwd('/Users/cberry/')
> 1 + 2
3 + 4
print("the end")
'org_babel_R_eoe'
[1] 3
> [1] 7
>
[1] "the end"
> [1] "org_babel_R_eoe"
--8<---------------cut here---------------end--------------->8---
If this is what your session looks like, then we need to dig deeper into ob-R.
HTH,
Chuck
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org babel R source blocks :results output with :session includes extra blank lines
2018-08-28 16:57 ` Berry, Charles
@ 2018-08-28 22:24 ` Dylan Schwilk
0 siblings, 0 replies; 3+ messages in thread
From: Dylan Schwilk @ 2018-08-28 22:24 UTC (permalink / raw)
To: emacs-orgmode@gnu.org; +Cc: Berry, Charles
Thank you and my apologies. Seeing the session output you posted convinced me
the problem was with my ess settings.
Of course I should have known that because I could find no-one else with the
same problem and I could see no change to ob-R.el in the git repo in the past
months that could have affected this.
The problem turned out to be the ess variable ess-eval-visibly. The default, nil
works fine with ob-R (doc: "If nil, ESS doesn’t print input commands and doesn’t
wait for the process."). I had accidentally set to 'nowait (doc: If ’nowait,
ESS still shows the input commands, but don’t wait for the process.).
My apologies for the spurious post. I had not realized that I was setting that
ess variable.
Sincerely,
Dylan
On 08/28/2018 11:57 AM, Berry, Charles wrote:
> Cannot confirm. See inline.
>
>> On Aug 28, 2018, at 7:48 AM, Dylan Schwilk <dylan@schwilk.org> wrote:
>>
>> Hello,
>>
>> I recently have run into a change in output from my R language source code blocks.
>>
>> I have found that when I include :session to the source block header, I now get
>> extra blank lines in the #+results. This has broken my lecture slides for my
>> courses with too much extra blank space.
>>
>> for example:
>>
>> #+begin_src R :results output :exports both :session
>> 1 + 2
>> 3 + 4
>> print("the end")
>> #+end_src
>>
>> #+results:
>> : [1] 3
>> :
>> : [1] 7
>> :
>> : [1] "the end"
>>
>
> With the :session arg I get the output as you show it below.
>
> This was with master on commit f79545 from last month and on today's master (commit 38a8901).
>
>>
>> I do not have this issue when I omit the :session header argument, eg:
>>
>> #+begin_src R :results output :exports both
>> 1 + 2
>> 3 + 4
>> print("the end")
>> #+end_src
>>
>> #+results:
>> : [1] 3
>> : [1] 7
>> : [1] "the end"
>>
>>
>
>
> FWIW, my R session looks like this
>
>
> --8<---------------cut here---------------start------------->8---
> [...]
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> setwd('/Users/cberry/')
>> 1 + 2
> 3 + 4
> print("the end")
> 'org_babel_R_eoe'
> [1] 3
>> [1] 7
>>
> [1] "the end"
>> [1] "org_babel_R_eoe"
> --8<---------------cut here---------------end--------------->8---
>
> If this is what your session looks like, then we need to dig deeper into ob-R.
>
> HTH,
>
> Chuck
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-28 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28 14:48 org babel R source blocks :results output with :session includes extra blank lines Dylan Schwilk
2018-08-28 16:57 ` Berry, Charles
2018-08-28 22:24 ` Dylan Schwilk
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).