From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Aaron Ecay <aaronecay@gmail.com>
Cc: Andreas Kiermeier <andreas.kiermeier@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: R code block produces only partial output
Date: Wed, 6 Aug 2014 08:59:51 -0700 [thread overview]
Message-ID: <alpine.OSX.2.00.1408060800160.354@charles-berrys-macbook.local> (raw)
In-Reply-To: <87tx5qwbai.fsf@gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2826 bytes --]
On Tue, 5 Aug 2014, Aaron Ecay wrote:
> Hi Chuck,
>
> 2014ko abuztuak 5an, "Charles C. Berry"-ek idatzi zuen:
>
> [...]
>
>>
>>
>> Here is the docstring from ESS's inferior-S-prompt:
>>
>> inferior-S-prompt is a variable defined in `ess-custom.el'.
>> Its value is "[]a-zA-Z0-9.[]*\\([>+.] \\)*> "
[snip]
>>
>> ----
>>
>> Note that there is a space *required* after the [>+.], but the hard coded
>> regex in `org-babel-R-evaluate-session' lets the space be optional.
>>
>> I am guessing the a-zA-Z stuff is there to strip 'Browse[1]> ' prompts and
>> such, which probably isn't an issue for babel.
>
> Why doesn’t org just use the value of inferior-S-prompt? (which would
> then need to have the bit concatenated to the end that matches
> e.g. [1]). Another way of putting this might be “does the space that
> ESS requires ever turn up missing?”
I don't really know why.
Re the space, do the characters preceeding the [>+.] ever show up
in Babel output?
>
>>
>> Just before the defcustom for inferior-S-prompt, I see this comment
>> in ess-custom.el:
>>
>> ;; need to recognise + + + > > >
>> ;; and "+ . + " in tracebug prompt
>>
>> Ha! The '.' seems to be for ess-tracebug. I am guessing that nobody will
>> need to output tracebug sessions from babel. So maybe it is safe to delete
>> the "." after all - or at least require the space after it.
>
> Tracebug is on by default in ESS – C-h v ess-use-tracebug. Tracebug
> even has babel support: see e.g. line 148 in ess.tracebug.el
> <https://github.com/emacs-ess/ESS/blob/4283f1304a54502c42707b6a4ba347703f0992dd/lisp/ess-tracebug.el#L148>.
>
When I said 'output tracebug sessions' I meant in the sense of using
`:results output' to save the part of the session pertaining to tracebug
in the *.org buffer, which seemed like an unusual use case.
>>
>> Maybe the regex should be put in a defcustom.
>
> Why?
options(prompt="$ ") # for example
Plus, if anything like the case that started this thread ever happens
again it might be easier to figure out and offer workarounds for special
cases that would be hazardous as a default setting.
> The current mismatch between babel and ESS seems like a bug, but
> once that’s fixed I don’t see the use case for configurability here.
> (But maybe you have something in mind...)
It looks like the babel regex was copied and intentionally modified for
some reason --- suggesting the author knows something we do not, e.g. a
case that would be broken by using `inferior-S-prompt'.
I don't have a handle on all the issues in `comint-use-prompt-regexp' and
all the `inferior-*-prompt' variables, but those are customizable.
If the mismatch is a bug, why not use 'inferior-S-prompt' as the default
and allow customization or at least use `(defvar org-babel-R-prompt
inferior-S-prompt)'?
HTH,
Chuck
prev parent reply other threads:[~2014-08-06 16:00 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 11:18 R code block produces only partial output Andreas Kiermeier
2014-08-04 11:53 ` Eric Schulte
2014-08-04 12:23 ` Andreas Kiermeier
2014-08-04 13:10 ` Eric Schulte
2014-08-05 0:46 ` Andreas Kiermeier
2014-08-05 4:00 ` John Hendy
2014-08-05 4:31 ` Andreas Kiermeier
2014-08-05 18:05 ` Charles Berry
2014-08-05 19:02 ` Eric Schulte
2014-08-05 19:11 ` John Hendy
2014-08-05 19:57 ` Nick Dokos
2014-08-05 20:10 ` Nick Dokos
2014-08-05 22:21 ` Charles C. Berry
2014-08-06 3:32 ` Aaron Ecay
2014-08-06 11:30 ` Eric Schulte
2014-08-07 6:00 ` Aaron Ecay
2014-08-07 17:42 ` Charles C. Berry
2014-08-07 18:06 ` Aaron Ecay
2014-08-07 18:42 ` Charles C. Berry
2014-08-07 19:06 ` Thomas S. Dye
2014-08-09 8:54 ` Rainer M Krug
2014-08-16 5:05 ` Aaron Ecay
2014-08-16 18:50 ` Charles C. Berry
2014-08-16 20:58 ` Aaron Ecay
2014-08-17 6:03 ` Achim Gratz
2014-08-19 0:13 ` Aaron Ecay
2014-08-19 5:36 ` Achim Gratz
2014-08-23 8:32 ` Aaron Ecay
2014-08-23 9:24 ` Andreas Kiermeier
2014-08-23 17:10 ` Aaron Ecay
2014-08-23 18:35 ` Thomas S. Dye
2014-08-23 19:37 ` Ista Zahn
2014-08-24 0:10 ` Charles C. Berry
2014-08-28 5:24 ` Aaron Ecay
2014-09-01 5:00 ` Aaron Ecay
2014-09-01 16:08 ` Charles C. Berry
2014-08-09 8:48 ` Rainer M Krug
2014-08-06 1:11 ` Andreas Kiermeier
2014-08-06 2:21 ` Charles C. Berry
2014-08-06 3:24 ` Aaron Ecay
2014-08-06 15:59 ` Charles C. Berry [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.00.1408060800160.354@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=aaronecay@gmail.com \
--cc=andreas.kiermeier@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.