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.[]*\\([>+.] \\)*> " > > Documentation: > Regexp used in S and R inferior and transcript buffers for prompt > navigation. > Customise it to make `comint-previous-prompt' quiqly navigate to > interesting portions of the buffer. > > > You can customize this variable. > > ---- > > 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?” > > 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>. > > Maybe the regex should be put in a defcustom. Why? 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...) -- Aaron Ecay