all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround
@ 2015-10-01 19:59 Cook, Malcolm
  2015-10-01 21:56 ` Charles C. Berry
  0 siblings, 1 reply; 14+ messages in thread
From: Cook, Malcolm @ 2015-10-01 19:59 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org; +Cc: bioc-devel@r-project.org, r-devel@r-project.org

Hello ,

I am not sure what the best solution is, but, in my hands using Org-mode version 8.3.2-elpa org-20150929 the reg-expt  used to "cleanup extra prompts left in output" is over-aggressive and will trim session :output at lines consisting exclusively of blanks and periods such as produced when printing a BioConductor 'Views' object which wants to appear as

#+RESULTS:
#+begin_example
  Views on a 23011544-letter DNAString subject
subject: CGACAATGCACGACAGAGGAAGCAGAACAGATATTTAGATTGCCTCTCATTTTCTCTCCCATATTATAGGGAGAAATATGATCGCGTATGCGAGAGTAGTGCCAACATATTGTGCTCTTTGATTTTTTGGCAACCCAAAATGGTGGCGGATGAACGAGATGATAATATATTCAAGTTGCCGCTAATCAGAAATAAATTCATTGCAACGTTAAATACAGCACAATATATGATCGCGTATGCGAGAGTAGTGCCAACATATTGTGCTAATGAGTGCCTCTCGTTCTCTGTCTTATA...TATCTTTCAAATTTTGATGACCCCCACTAGCAAAAAATGCGAAAATTAACCCAAATAATGATTTCCCTAAATCCTTCCAAAAGTAAATATTAACTTTTTGGCAAAATCCATTTTCCCAAATTTCGGTCATTAAATAATCAGTTTTTTGCCACAACTTTTAAAATAATTGTCTGAAAATGGAATGTCATATCTCGATGAGCTCATAATTAAATTTACAATCAAACTGTGTTCGAAAAAGAGAAAACTAACATTTTTTTGGCATATTTGCAAATTTTGATGAACCCCCCTTTCAAA
views:
         start      end width
  [1]   344766   344773     8 [CATGAGGC]
  [2]   563564   563571     8 [CATGAGGC]
  [3]   641027   641034     8 [CATGAGGC]
  [4]   656168   656175     8 [CATGAGGC]
  [5]   709112   709119     8 [CATGAGGC]
  ...      ...      ...   ... ...
[141] 22209984 22209991     8 [CATGAGGC]
[142] 22371543 22371550     8 [CATGAGGC]
[143] 22554991 22554998     8 [CATGAGGC]
[144] 22618578 22618585     8 [CATGAGGC]
[145] 22897728 22897735     8 [CATGAGGC]
#+end_example

But alas rather appears as:

#+RESULTS:
#+begin_example
  ...      ...      ...   ... ...
[141] 22209984 22209991     8 [CATGAGGC]
[142] 22371543 22371550     8 [CATGAGGC]
[143] 22554991 22554998     8 [CATGAGGC]
[144] 22618578 22618585     8 [CATGAGGC]
[145] 22897728 22897735     8 [CATGAGGC]
#+end_example


I offer as a possible workaround the following:

So far, I have had good success having removed provision for allowing leading whitespace by changing the regexp  org-babel-R-evaluate-session  from
      "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)"
 to
      "^\\([>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)"

But I don't know all the test cases so, YMMV....

HTH,

~Malcolm (who, FWIW, has never really liked the way ob-R communicated with the inferior R session in the first place....)

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

end of thread, other threads:[~2015-11-09 22:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 19:59 BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround Cook, Malcolm
2015-10-01 21:56 ` Charles C. Berry
2015-10-01 23:15   ` Cook, Malcolm
2015-10-08 19:24     ` Charles C. Berry
2015-10-08 20:41       ` Cook, Malcolm
2015-11-05 12:57       ` Nicolas Goaziou
2015-11-06 23:11         ` Charles C. Berry
2015-11-07 21:30         ` Charles C. Berry
2015-11-07 21:41           ` Nicolas Goaziou
2015-11-07 23:22           ` Cook, Malcolm
2015-11-08  0:32             ` Charles C. Berry
2015-11-09 20:04               ` Cook, Malcolm
2015-11-09 20:56                 ` Charles C. Berry
2015-11-09 22:11                   ` Cook, Malcolm

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.