[ESS] tcsh, bash, and the inferior R process

Erik Iverson iverson at biostat.wisc.edu
Mon Oct 15 19:34:56 CEST 2007

Hello -

I have been using the "tcsh" shell under Linux for a while now.  Today, 
I experimented with changing my default shell to bash.  The behavior of 
the inferior R process mode (iESS) in ESS seems to change depending on 
which shell I'm using, and I can't figure out why.

First, my software.  I'm using ESS 5.3.6, R 2.5.1, XEmacs 21.5.24 
(Beta), all on RHEL4.  I've verified the issue using Emacs also, so 
XEmacs doesn't seem to be the problem.

I am using ypchsh to change my default shell, since we use NIS here.

So here is my problem.  I start an inferior R process using M-x R, and 
issue a command, say

 > 2 + 2
[1] 4

Now, if my shell is tcsh, I am able to move point to the line containing 
"2 + 2", and hit "Return" to copy "2 + 2" to the inferior R mode's 
prompt.  I could then edit the command, and hit "Return" again to submit 

However, after changing my default shell to the bash shell, moving point 
to the "2 + 2" line and hitting "Return" copies the "2 + 2" command 
*and* submits it to the R process, so I see

 > 2 + 2
[1] 4

again, with only hitting "Return".  So I seem to have lost my editing 

Another issue is that, using tcsh, I am used to hitting C-c C-c to move 
point to a command prompt in the iESS buffer.

Under bash, C-c C-c seems to do this properly, but it copies whatever 
line I'm on before doing it.  For example,
hitting C-c C-c on the 2 + 2 line, I get

 > 2 + 2 C-c C-c

So it literally prints 'C-c C-c' in the iESS buffer.  Further, if I hit 
C-c C-c on the
[1] 4
line, the minibuffer says "No command on this line." and point remains 
on that line.

If anyone has any idea why changing shells might do this, I'd be glad to 
try some things!

I do very often submit R code from a source file to the R process, and 
that still works just fine.  I do prefer that approach, but once in 
awhile find myself typing something quick in the iESS buffer.  I'm just 
curious why the shell might be affecting the bahavior of that buffer. 
Hopefully this isn't something obvious that I've overlooked.  I've only 
tried tcsh and bash, I suppose I could try some more shells and see what 
behavior I observe.

Erik Iverson
iverson at biostat.wisc.edu

More information about the ESS-help mailing list