Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh 4.0.4 and Emacs 21.1 in Windows XP



Gary Oberbrunner wrote:
> I'm trying to use Zsh 4.0.4 on Windows XP with Emacs 21.1 in shell-mode. 
>  I compiled both of them from sources.
> 
> Everything works OK except zsh thinks all my input has an extra CR (^M) 
> at the end of each line.

If you mean you are seeing extra ^M's appearing, I don't think this is
specific to Windows, actually.  Here's the entry from the FAQ --- see if
this helps with your problem.

3.10: Why does zsh not work in an Emacs shell mode any more?

  (This information comes from Bart Schaefer and other zsh-workers.)

  Emacs 19.29 or thereabouts stopped using a terminal type of "emacs"
  in shell buffers, and instead sets it to "dumb".  Zsh only kicks in
  its special I'm-inside-emacs initialization when the terminal type
  is "emacs".

  Probably the most reliable way of dealing with this is to look for
  the environment variable `$EMACS', which is set to `t' in
  Emacs' shell mode.  Putting

    [[ $EMACS = t ]] && unsetopt zle

  in your .zshrc should be sufficient.

  Another method is to put

    #!/bin/sh
    TERM=emacs exec zsh

  into a file ~/bin/eshell, then `chmod +x ~/bin/eshell', and
  tell emacs to use that as the shell by adding

    (setenv "ESHELL" (expand-file-name "~/bin/eshell"))

  to ~/.emacs.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author