Re: [O] suppress leading ":" in org-babel output
Hello, Many thanks updating org-mode resolved the issue Best regards, Jeremie > FWIW, I just get the last line: > > #+NAME:mean_purchase_per_shopping_trip > > #+BEGIN_SRC R :var x=6 :results output :session *R* > a <-sprintf("%.2f",12.234324) > cat(a,sep="\n") > #+END_SRC > > #+RESULTS: > : 12.23 > > This is with > >GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of > 2019-05-01 >Org mode version 9.2.3 (release_9.2.3-367-gd79e80 @ > /home/nick/elisp/org-mode/lisp/) >R version 3.5.3 (2019-03-11) -- "Great Truth" > > on Fedora 29.
Re: [O] suppress leading ":" in org-babel output
"Berry, Charles" writes: >> On May 27, 2019, at 7:17 PM, Nick Dokos wrote: >> >> Jeremie Juste writes: >> >>> Hello, >>> >>> I recall seeing this thread on the mailing list but I cannot find it >>> back. >>> >>> I would like to suppress the first line leading ":" in the following output >>> >>> >>> #+NAME:mean_purchase_per_shopping_trip >>> >>> #+BEGIN_SRC R :var x=6 :results output :session *R* >>> a <-sprintf("%.2f",12.234324) >>> cat(a,sep="\n") >>> #+END_SRC >>> >>> #+RESULTS: mean_purchase_per_shopping_trip >>> : >>> >>> : 12.23 >>> >> >> FWIW, I just get the last line: >> >> #+NAME:mean_purchase_per_shopping_trip >> >> #+BEGIN_SRC R :var x=6 :results output :session *R* >> a <-sprintf("%.2f",12.234324) >> cat(a,sep="\n") >> #+END_SRC >> >> #+RESULTS: >> : 12.23 >> >> This is with >> >> GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of >> 2019-05-01 >> Org mode version 9.2.3 (release_9.2.3-367-gd79e80 @ >> /home/nick/elisp/org-mode/lisp/) >> R version 3.5.3 (2019-03-11) -- "Great Truth" >> >> on Fedora 29. >> > > I get what Jeremie reports (but he has a blank line inserted after the first > line, IIUC) > > This is with: > > GNU Emacs 26.1 > Org 9.2.3 > ess-version: 18.10.3 > R version 3.6.0 (2019-04-26) > > I believe this is new-ish behavior. I see some older files without the > extra line. Also, I think there are recent changes in ESS that pertain > to comint sessions. > > FWIW, here is a clip from my session: > >> x <- 6L > a <-sprintf("%.2f",12.234324) > cat(a,sep="\n") > 'org_babel_R_eoe' >> > > 12.23 >> > [1] "org_babel_R_eoe" > > > If Nick sees something different maybe a change in ESS is the culprit. > Here's what I see in the session buffer: , | > > if (identical(getOption('pager'), file.path(R.home('bin'), 'pager'))) options(pager='cat') # rather take the ESS one | > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', show.error.locations=TRUE) | > x <- 6L | a <-sprintf("%.2f",12.234324) | cat(a,sep="\n") | 'org_babel_R_eoe' | x <- 6L | > a <-sprintf("%.2f",12.234324) | > cat(a,sep="\n") | 12.23 | > 'org_babel_R_eoe' | [1] "org_babel_R_eoe" | > ` -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
Re: [O] suppress leading ":" in org-babel output
> On May 27, 2019, at 7:17 PM, Nick Dokos wrote: > > Jeremie Juste writes: > >> Hello, >> >> I recall seeing this thread on the mailing list but I cannot find it >> back. >> >> I would like to suppress the first line leading ":" in the following output >> >> >> #+NAME:mean_purchase_per_shopping_trip >> >> #+BEGIN_SRC R :var x=6 :results output :session *R* >> a <-sprintf("%.2f",12.234324) >> cat(a,sep="\n") >> #+END_SRC >> >> #+RESULTS: mean_purchase_per_shopping_trip >> : >> >> : 12.23 >> > > FWIW, I just get the last line: > > #+NAME:mean_purchase_per_shopping_trip > > #+BEGIN_SRC R :var x=6 :results output :session *R* > a <-sprintf("%.2f",12.234324) > cat(a,sep="\n") > #+END_SRC > > #+RESULTS: > : 12.23 > > This is with > > GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of > 2019-05-01 > Org mode version 9.2.3 (release_9.2.3-367-gd79e80 @ > /home/nick/elisp/org-mode/lisp/) > R version 3.5.3 (2019-03-11) -- "Great Truth" > > on Fedora 29. > I get what Jeremie reports (but he has a blank line inserted after the first line, IIUC) This is with: GNU Emacs 26.1 Org 9.2.3 ess-version: 18.10.3 R version 3.6.0 (2019-04-26) I believe this is new-ish behavior. I see some older files without the extra line. Also, I think there are recent changes in ESS that pertain to comint sessions. FWIW, here is a clip from my session: --8<---cut here---start->8--- > x <- 6L a <-sprintf("%.2f",12.234324) cat(a,sep="\n") 'org_babel_R_eoe' > > 12.23 > [1] "org_babel_R_eoe" --8<---cut here---end--->8--- If Nick sees something different maybe a change in ESS is the culprit. Not sure what the right path forward is ob-R.el, but as a workaround the OP can use a :post header arg to strip the offending line. HTH, Chuck
Re: [O] suppress leading ":" in org-babel output
Jeremie Juste writes: > Hello, > > I recall seeing this thread on the mailing list but I cannot find it > back. > > I would like to suppress the first line leading ":" in the following output > > > #+NAME:mean_purchase_per_shopping_trip > > #+BEGIN_SRC R :var x=6 :results output :session *R* > a <-sprintf("%.2f",12.234324) > cat(a,sep="\n") > #+END_SRC > > #+RESULTS: mean_purchase_per_shopping_trip > : > > : 12.23 > FWIW, I just get the last line: #+NAME:mean_purchase_per_shopping_trip #+BEGIN_SRC R :var x=6 :results output :session *R* a <-sprintf("%.2f",12.234324) cat(a,sep="\n") #+END_SRC #+RESULTS: : 12.23 This is with GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of 2019-05-01 Org mode version 9.2.3 (release_9.2.3-367-gd79e80 @ /home/nick/elisp/org-mode/lisp/) R version 3.5.3 (2019-03-11) -- "Great Truth" on Fedora 29. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
[O] suppress leading ":" in org-babel output
Hello, I recall seeing this thread on the mailing list but I cannot find it back. I would like to suppress the first line leading ":" in the following output #+NAME:mean_purchase_per_shopping_trip #+BEGIN_SRC R :var x=6 :results output :session *R* a <-sprintf("%.2f",12.234324) cat(a,sep="\n") #+END_SRC #+RESULTS: mean_purchase_per_shopping_trip : : 12.23 Best regards, Jeremie Org mode version 9.2.1 (9.2.1-8-g1b1797-elpaplus @ /home/djj/.emacs.d/elpa/org-plus-contrib-20190211/) GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-05-16