[ESS] tcsh, bash, and the inferior R process
Martin Maechler
maechler at stat.math.ethz.ch
Tue Oct 16 08:32:36 CEST 2007
>>>>> "EI" == Erik Iverson <iverson at biostat.wisc.edu>
>>>>> on Mon, 15 Oct 2007 17:12:05 -0500 writes:
EI> I now see from the ESS manual (Section 4.4.3) that
EI> 4.4.3 Re-submitting commands from the transcript
EI> ...
EI> When the cursor is not after the current prompt, the <RETURN> key has a
EI> slightly different behavior than usual. Pressing RET on any line
EI> containing a command that you entered (i.e. a line beginning with a
EI> prompt) sends that command to the ESS process once again. If you wish to
EI> edit the command before executing it, use C-c RET instead; it copies the
EI> command to the current prompt but does not execute it, allowing you to
EI> edit it before submitting it.
EI> ...
EI> If I interpret the manual correctly, it appears that invoking Xemacs
EI> under tcsh is actually doing the wrong thing. Regular Emacs under tcsh
EI> appears to do the right thing, that is, send the command that point is
EI> on *and* submit it. Xemacs under tcsh will copy the command to the
EI> command prompt and leave point at the *beginning* of the command upon
EI> hitting <RETURN> on a previous command. C-c <RETURN> copies the command
EI> to the prompt and puts point at the *end* of the command.
EI> C-c Ret works in Xemacs lauched from bash for me as documented. I will
EI> now use C-c <RETURN> to do what I was used to doing, or remap the
EI> <RETURN> key since I know the elisp function names now.
EI> So the upshot is that I (believe) XEmacs lauched from a tcsh shell is
EI> actually doing the *wrong* thing, and I had just gotten used to it.
Yes, that's correct.
As to *why* you observe this,
Sebastian Luque gave you a very good answer!
[ The following is a bit technical and only very vaguely related
to ESS :
I've seen similar behavior (both with KDE and GNOME) and with
recent releases of OS / desktop actually have been quite
frustrated by the fact that login via gdm/xdm (the "graphical login")
seems to do less and less ``shell & login initialization''
(~/.bashrc ~/.profile, etc) as compared with simple 'ssh' login
or starting a shell in a terminal.
I vaguely remember I've been able to work around these
infelicities by doing things like ". ~/.profile" inside
my ~/.Xclients ...
but then I've also found that ~/.Xclients had been completely
replaced just by clicking some desktop GUIs like "Desktop switcher"
... {aarrgh ... feels like using Micro$oft products ..}
]
Martin
More information about the ESS-help
mailing list