ESS-mode and X-emacs problem

Douglas Bates bates@stat.wisc.edu
16 Jan 1998 09:02:17 -0600


kim.pilegaard@risoe.dk (Kim Pilegaard) writes:

> When I try to invoke R from xemacs I get the following responses:
> 
> ESS starting data directory? ~/
> 
> "Process R is not running". 
> 
> This is what the R buffer shows:
> 
> R : Copyright 1997, Robert Gentleman and Ross Ihaka
> Version 0.61.0 Alpha (December 21, 1997)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type	"license()" for details.
> 
> Type	"demo()" for some demos, "help()" for on-line help, or
> 	"help.start()" for a HTML browser interface to help.
> 
> "TERMCAP", line 0, terminal 'emacs': /usr/share/terminfo: permission denied
> 
> Process R exited abnormally with code 1 at Fri Jan  9 08:11:59 1998
> 
> R runs correct from the shell and is installed as /usr/local/bin/R.
> I am running Linux 2.0, Xemacs 19-14 and R-0.61.

It looks like R is trying to run with the readline history facilities
started.  It shouldn't do this when you are running under ESS.

One quick fix might be to install a terminfo entry for the "emacs" 
terminal type but I'm not sure how you do that.

I had thought that when ESS started the R process it should send the
-noreadline flag to it.  From the R manual page

       The following options are present to support the use of  R
       from  other  programs.   In  particular,  the  -noreadline
       option exists so that R can  be  run  under  emacs(1)  and
       xemacs(1) using ESS.

       -noreadline
              Turn  off  the  use of the readline(3) command line
              editing.

If R is getting the -noreadline flag properly then my guess is that
the call to initialize the readline library (probably in
$RHOME/src/unix/system.c) is not being protected by an if statement
that checks for this flag.

Earlier I reported a problem in $RHOME/src/unix/system.c that some
ifdef's were checking for HAVE_READLINE_HISTORY_H but that variable
was not being defined by the autoconfigure script.  I'm not sure if
that has been corrected yet.

When I was looking for those definitions I noticed the
autoconfiguration on the version I compiled for Debian Linux 2.0 does
not set HAVE_READLINE but that version on Debian Linux 1.3 does.  This 
looks like another autoconfigure problem. 
-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._