[comp.emacs] tcsh vs shell-mode

wrp@biochsn.acc.Virginia.EDU (William R. Pearson) (09/01/90)

	I have become addicted to the 'tcsh' c-shell replacement on
my suns (3/50, sparcstation, running 4.0.3).  Unfortunately, when start
a sub-shell under GNUemacs, all of the lines are echoed, so that each line
looks like:

	ls^M
	ls
	...

	I believe that the tcsh is resetting the modes on the pty to
enable echo, which it is supposed to do on a normal terminal line.

	This does not happen with GNUemacs and the tcsh on my mips M/120,
however, I am running 18.52 on the mips and 18.55 on the sun.  I have
attempted to fix the problem by setting the variable "shell-file" to run
the csh, but I have not succeeded in getting a different shell.

	Any suggestions?

Bill Pearson

esulzner@cadev6.intel.com (Eric Sulzner ~) (09/20/90)

In article <1990Aug31.171026.15996@murdoch.acc.Virginia.EDU> wrp@biochsn.acc.Virginia.EDU (William R. Pearson) writes:
	   I have become addicted to the 'tcsh' c-shell replacement on
   my suns (3/50, sparcstation, running 4.0.3).  Unfortunately, when start
   a sub-shell under GNUemacs, all of the lines are echoed, so that each line
   looks like:

	   ls^M
	   ls
	   ...

	   I believe that the tcsh is resetting the modes on the pty to
   enable echo, which it is supposed to do on a normal terminal line.

	   This does not happen with GNUemacs and the tcsh on my mips M/120,
   however, I am running 18.52 on the mips and 18.55 on the sun.  I have
   attempted to fix the problem by setting the variable "shell-file" to run
   the csh, but I have not succeeded in getting a different shell.

	   Any suggestions?

   Bill Pearson

'stty -echo nl' works for me.

I run csh and 18.55 on Ultrix and suns.  The problem shows up after rlogins.
I'm using cmushell now, but I recall the same happened under shell.

There should be a more elegant solution.

mattson@mbongo.ucsd.edu (Jim Mattson) (09/21/90)

esulzner@cadev6.intel.com (Eric Sulzner ~) writes:

>In article <1990Aug31.171026.15996@murdoch.acc.Virginia.EDU> wrp@biochsn.acc.Virginia.EDU (William R. Pearson) writes:
>>	   I have become addicted to the 'tcsh' c-shell replacement on
>>   my suns (3/50, sparcstation, running 4.0.3).  Unfortunately, when start
>>   a sub-shell under GNUemacs, all of the lines are echoed, so that each line
>>   looks like:

>>	   ls^M
>>	   ls
>>	   ...
>> [text deleted]
>>	   Any suggestions?

>>   Bill Pearson

>'stty -echo nl' works for me.
> [ more text deleted]

I use tcsh too, and for this problem, I have the following line in my .cshrc:

        if ($TERM == emacs) unset edit

--jim
--
	Internet: jmattson@ucsd.edu
	Bitnet:	jmattson@ucsd
	UUCP:	{ucbvax|rutgers|bellcore}!ucsd!jmattson

wmesard@oracle.com (Wayne Mesard) (09/25/90)

mattson@mbongo.ucsd.edu (Jim Mattson) writes:
>esulzner@cadev6.intel.com (Eric Sulzner ~) writes:
>>In article <1990Aug31.171026.15996@murdoch.acc.Virginia.EDU> wrp@biochsn.acc.Virginia.EDU (William R. Pearson) writes:
>>>   a sub-shell under GNUemacs, all of the lines are echoed...
>>'stty -echo nl' works for me.
>> [ more text deleted]
>I use tcsh too, and for this problem, I have the following line in my .cshrc:
>
>        if ($TERM == emacs) unset edit

Look at the documentation for the shell command
(say Control-H F shell <Return>).  It describes how the shell is
selected.  It looks at explicit-shell-file-name, not shell-file-name.
I use tcsh normally, but csh when running under Emacs. 
From my .emacs file:

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

Wayne();