[R-SIG-Mac] problem with R prompt on MAC
Tom Cook
cook at biostat.wisc.edu
Mon Apr 10 17:30:34 CEST 2006
I sent the following message out a few weeks ago regarding the
disappearance of the R prompt. I didn't get any responses, but I've
done some more digging and here's what I found out. In the source
file main.c there is a routine defined as follows:
char *R_PromptString(int browselevel, int type)
{
if (R_Slave) {
BrowsePrompt[0] = '\0';
return BrowsePrompt;
}
else {
if(type == 1) {
if(browselevel) {
sprintf(BrowsePrompt, "Browse[%d]> ", browselevel);
.
.
.
I replaced the `if(R_Slave) {' with `if(0) {' (forcing execution of
the `else' clause) and recompiled and the prompt problem I described
is fixed. Apparently `R_Slave' is being set (at least of the purpose
of this routine) even though I don't run R with the `--slave' option.
On the other hand, other output normally suppressed by `--slave' still
shows up (and it asks about saving the workspace when I exit), so this
behavior doesn't seem to be global. Of course, now if I run R with
the `--slave' option, other output is suppressed, but I still get the
prompt, however, since I don't have a reason to use `--slave' at this
moment, this is not a problem for me.
My c skills are pretty rudimentary, so I have no idea what could be
causing this problem in the first place. Even though I'm now back up
and running, this is clearly the wrong fix. Any idea what the root
cause is and what the right fix is?
Thanks,
Tom
On March 20, 2006 Tom Cook wrote:
> I have a MAC powerbook on which I have been running R, usually via an
> X11-based version of emacs that I compiled myself. I recently
> upgraded my teTeX distribution, after which I began experiencing a
> problem with R. Specifically, the prompt has disappeared. If I run R
> in a shell window, I get no prompt, but if I imagine that one is there
> and just type stuff as usual, it seems to function normally. (Also
> options()$prompt returns "> " as expected.) If I run R via emacs, the
> lack of a prompt confuses ESS, so that's a problem. I'm assuming that
> there is some library that I "upgraded" when I installed teTeX which R
> is also using which is causing this problem, but I have no idea what
> it could be. Other interactive programs running within the shell
> don't seem to have been affected.
>
> I reinstalled the R MAC binaries thinking this might put something
> back, but it didn't fix the problem. Next, I downloaded the latest R
> source and recompiled, but this didn't fix it either. I also thought
> it might have something to do with "readline" but running R with or
> without "--no-readline" has no effect.
>
> Does anyone have any idea what could be going on? Is there anything
> else I should try? Is there a standard library that handles this
> operation that I should look for?
>
> Any help would be appreciated.
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
More information about the R-SIG-Mac
mailing list