all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help debugging R source code block output problem with :session
@ 2020-08-28 20:11 Dylan Schwilk
  2020-08-29  2:36 ` Jack Kamm
  0 siblings, 1 reply; 25+ messages in thread
From: Dylan Schwilk @ 2020-08-28 20:11 UTC (permalink / raw)
  To: emacs-orgmode

I returned to an org file this week and found that I am getting 
some strange source code block output for R code when I use the 
:session header. I have been able to duplicate this with a minimal 
init file. I strongly suspect it is some problem at my end but 
perhaps folks here can help me know here to look? It occurs with a 
minimal emacs initialization.

First, here is a small org file example of the problem. In the 
second results block the ">" appears to be treated as a prompt 
line to strip from output but only when a session is started. This 
happens with any ">" in output when the :session header occurs. 
the problem is dramatic when printing tibbles where the column 
modes are enclosed in angle brackets.

test.org
>>>
** Test org babel R output prompt problem
#+begin_src R :results output
print("<X> <Y> <!>")
print("one <two> three")
print("end")
#+end_src

#+RESULTS:
: [1] "<X> <Y> <!>"
: [1] "one <two> three"
: [1] "end"

#+begin_src R :results output :session "NEW"
print("<X> <Y> <!>")
print("one <two> three")
print("end")
#+end_src

#+RESULTS:
: [1] "<
: <
: <!>"
: [1] "one <
: three"
: [1] "end"
<<<

The second block produces the bad output. This occurs with a 
minimal setup.
I start emacs with
> emacs -Q -l "~/debugorg.el"

where debugorg.el is:

>>
require 'package)
add-to-list 'package-archives '("melpa" . 
"https://melpa.org/packages/") t)
add-to-list 'package-archives '("org" . 
"https://orgmode.org/elpa/") t)
package-initialize)

require 'ess-site)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))
<<

emacs version 26.3
org-mode version 9.3.7
ess version 18.10.3snapshot

-- 


^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: Help debugging R source code block output problem with :session
@ 2022-01-11 23:36 John Hendy
  2022-01-12  7:49 ` Jeremie Juste
  0 siblings, 1 reply; 25+ messages in thread
From: John Hendy @ 2022-01-11 23:36 UTC (permalink / raw)
  To: Jack Kamm, Jeremie Juste, Berry, Charles, emacs-orgmode,
	Ilja Kocken, Dylan Schwilk

Greetings,

Apologies for writing off-list, but I don't have the original thread
anymore to reply to. I just pulled this group in directly from the
email I found... I just got bitten by this as well and burned most of
my afternoon trying to figure out what the issue was.

Any further thoughts on a patch that could be finalized/applied?

Is the one from the thread still the best from your continued experience?
https://list.orgmode.org/87zgxc42qg.fsf@gmail.com/

This r/orgmode post was what finally got me to the existence of this
as a previous issue (I'd just sent my own email to list as my
searching did not find the above):
https://www.reddit.com/r/orgmode/comments/pt3em4/source_block_modifying_format_of_results_r/

And it links to a patch as well:
https://gist.github.com/gtuckerkellogg/e356d20497cfdc8e4fc683412e320e3e

Many thanks,
John


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-01-12 15:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 20:11 Help debugging R source code block output problem with :session Dylan Schwilk
2020-08-29  2:36 ` Jack Kamm
2020-08-29  4:07   ` Dylan Schwilk
2020-08-29  7:24     ` Jack Kamm
2020-08-29 20:35       ` Berry, Charles via General discussions about Org-mode.
2020-08-30  4:37         ` Dylan Schwilk
2020-08-30 15:08         ` Jack Kamm
2020-09-07  8:18         ` Jack Kamm
2020-09-07  8:45           ` Jack Kamm
2020-09-07 17:37             ` Berry, Charles via General discussions about Org-mode.
2020-09-07 20:07               ` Jack Kamm
2020-09-07 22:12                 ` Berry, Charles via General discussions about Org-mode.
2020-09-08  1:06                   ` Jack Kamm
2020-09-08  2:08                     ` Berry, Charles via General discussions about Org-mode.
2020-09-08 14:51                       ` Jack Kamm
2020-09-08 16:45                         ` Berry, Charles via General discussions about Org-mode.
2020-09-08 17:41                           ` Jack Kamm
2020-09-18 16:39                             ` Dylan Schwilk
2020-10-28 13:13                 ` Jack Kamm
2020-10-28 13:46                   ` Jeremie Juste
2020-08-30  4:18       ` Dylan Schwilk
2021-05-03  8:53       ` Jeremie Juste
  -- strict thread matches above, loose matches on Subject: below --
2022-01-11 23:36 John Hendy
2022-01-12  7:49 ` Jeremie Juste
2022-01-12 15:04   ` John Hendy

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.