tcsh in a shell buffer (help !!)

Jim McCoy mccoy at accuvax.nwu.edu
Sat Jul 22 04:44:01 AEST 1989


In article <94 at brazos.Rice.edu> eho at word.princeton.edu (Eric Ho) writes:
>X-Sun-Spots-Digest: Volume 8, Issue 68, message 19 of 22
>
>Does anyone know how to make tcsh processes output sensibly ?  I'm getting
>all these extra ^M's at the end of lines in the shell buffer in Emacs.
>I'm running GNU Emacs 18.54 on my Sun-4/110M-16 under OS 4.0.1 (Generic
>kernel) and I got my copy of tcsh from uunet.uu.net about a month ago
>(tcsh.sun4os4 -- a ready-to-go tcsh binary).  Someone told me to put 'stty
>nl -echo' in my .emacs_csh or .emacs_tcsh file but that still won't help.
>These extra ^M's are really a drag !!  It doesn't seem to matter what kind
>of shell buffer I'm firing up -- doing 'm-x shell' or 'm-x cmushell' both
>give me the extra ^M's.  It isn't an Emacs problem per se since it works
>fine if I'm uisng sh or csh as my default shell, so ...
>
>Any pointers appreciated.
>

While I have not gone digging into the Emacs code in a long time, I know
that tcsh will consistently screw up your shell buffer.  Two approaches to
this problem are to either grab bash (the GNU 'Bourne-again shell' writen
by brian fox) or to set your emacs shell hook to /bin/csh (if you don't
think you will need the filename completion, and other tcsh goodies when
you execute a emacs shell buffer).

To change the shell variable in emacs, place the following lines in you
emacs startup files:

(setq shell-file-name "/bin/csh")
(setq explicit-shell-file-name "/bin/csh")

I think this should solve your problems, but not in the most preferable
way.  If anyone else has hacked a work-around for the Emacs/tcsh problems,
i would love to hear about it.


------------------------------< Jim McCoy >------------------------------------
mccoy at acns.nwu.edu                  |  "...far too many notes for my taste"
#include <disclaimer.h>             |        -Phantom of the Opera
			"To thine own self be true"



More information about the Comp.sys.sun mailing list