[ESS] tcsh, bash, and the inferior R process
iverson at biostat.wisc.edu
Wed Oct 17 22:38:47 CEST 2007
Thanks for the tips. I just discovered the problem, and this has
nothing really to do with ESS, but more with my *very* specific setup.
However, I've spent far too long figuring this out not to write it down
at this point :).
To briefly summarize,
I have a version of XEmacs compiled in my home directory to get XFT
support in Linux. When I was using tcsh, I had an environment variable
called EMACSPACKAGEPATH set in my .cshrc. This told XEmacs to look for
packages somewhere other than my home directory, because I didn't
download the sumo tarball.
So under tcsh, XEmacs would look for the comint package on one of our
servers, and use that version.
Under bash, when launching XEmacs, EMACSPACKAGEPATH was not being found.
I finally traced this back to my .bashrc file not being sourced when
logging into KDE. In my .Xclients file, I simply source it there, and I
suppose this ultimately was the fix to my problem.
So because EMACSPACKAGEDIR wasn't working with bash initially, I
downloaded the sumo tarball and used comint from there. I've just now
found that there was a patch submitted to the XEmacs version earlier
this year found here:
"This patch reverts work over the last year on upgrading comint and
shell." says the patch author. Specifically, in comint.el, there was
prior to the patch,
(defcustom comint-append-old-input t
"*If nil, old text selected by \\[comint-send-input] is re-sent
If non-nil, the old text is appended to the end of the buffer,
and a prompting message is printed.
This flag does not affect the behavior of \\[comint-send-input]
after the process output mark."
Now, had I been looking at the comint.el source that XEmacs was using
when firing off from tcsh, it would have been obvious why this was
happening. They removed this variable and functionality from comint in
the patch, which was the newer version the bash was picking up.
So really, this had nothing to do with switching shells per se, but
rather environment variables and which version of comint was being used,
which was my inkling all along, and it was yours, too. In hindsight,
that seems obvious, but it took awhile to see that. My hidden
assumption to myself was that comint didn't change, and that of course
turned out to be incorrect.
I recall reading never to set EMACSPACKAGEPATH somewhere. I suppose I
will heed those warnings from now on. On the plus side, I learned a lot
more about how ESS and comint work together, and about Elisp in general :).
Thanks for all the help,
Sebastian P. Luque wrote:
> On Mon, 15 Oct 2007 14:38:01 -0500,
> "Sebastian P. Luque" <spluque at gmail.com> wrote:
>> I've encountered this before, but can't remember how I dealt with it
>> now. I'll try to dig that out and get back later.
> I couldn't find that info because I think my distribution (Debian) or KDE
> dealt with that before I actually got to it. Here's the thread in
> emacs.help that taught me these things:
More information about the ESS-help