eho@word.princeton.edu (Eric Ho) (07/11/89)
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. Eric Ho Cognitive Science Lab., Princeton University voice = 609-987-2819 (x2987) email = eho@confidence.princeton.edu eho@bogey.princeton.edu regards. eric
rbj@dsys.ncsl.nist.gov (Root Boy Jim) (07/19/89)
? From: eho@word.princeton.edu (Eric Ho) ? 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. You shouldn't be using tcsh as your shell in emacs. You don't need all the emacs keys because you're already in a emacs buffer. And tcsh insists on resetting your terminal to a sane mode anyway, so things like `stty -echo nl' don't work. What you want is (setq explicit-shell-file-name "/bin/csh") (setq shell-file-name "/bin/csh") in your .emacs. The documentation refers to both these variables. You may be able to get away with only setting one, but I set both for safety. Why is this in the Sun group instead of the emacs group? ? Any pointers appreciated. char *foo = "bar"; ? Eric Ho ? Cognitive Science Lab., Princeton University ? voice = 609-987-2819 (x2987) email = eho@confidence.princeton.edu ? eho@bogey.princeton.edu Root Boy Jim Have GNU, Will Travel.
mccoy@accuvax.nwu.edu (Jim McCoy ) (07/22/89)
In article <94@brazos.Rice.edu> eho@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@acns.nwu.edu | "...far too many notes for my taste" #include <disclaimer.h> | -Phantom of the Opera "To thine own self be true"