Skip to content
Prev 934 / 63424 Next

ESS-mode and X-emacs problem

kim.pilegaard@risoe.dk (Kim Pilegaard) writes:
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.