From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13651 invoked from network); 27 Feb 1997 18:23:23 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 27 Feb 1997 18:23:23 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA19049; Thu, 27 Feb 1997 13:08:24 -0500 (EST) Resent-Date: Thu, 27 Feb 1997 13:08:24 -0500 (EST) From: "Bart Schaefer" Message-Id: <970227101613.ZM19757@candle.brasslantern.com> Date: Thu, 27 Feb 1997 10:16:13 -0800 In-Reply-To: Peter Stephenson "Re: Short loops?" (Feb 27, 10:32am) References: <199702270932.KAA15453@hydra.ifh.de> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.820 20aug96) To: Peter Stephenson , zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: Short loops? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"2CiFe2.0.af4.OsS5p"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2936 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Feb 27, 10:32am, Peter Stephenson wrote: } Subject: Re: Short loops? } } "Bart Schaefer" wrote: } > Peter, how about adding something about this to the FAQ as well? } } It looks like I should be adding two things to the FAQ. This is the } deyodled text. } } 3.6: Why does zsh not work in an Emacs shell mode any more? } } Placing a } } (setenv "TERM" "emacs") } } in your ~/.emacs file seems to fix this. This may not be universal, based on the discussion on zsh-users. It appears to work for the default shell-mode (shell.el) but not for the enhanced shell-mode supplied by comint (comint.el). Looking at the lisp code in comint.el, it appears emacs forces TERM=dumb for systems where emacs is compiled with terminfo, and TERM=emacs for those where it's compiled with termcap. There's no hook to override this; you can only redefine comint-exec-1 as in the sample I sent, which is bad if comint gets upgraded. This: } that are run from within emacs, you can instead use } } (setenv "ESHELL" "~/bin/eshell") } } and then put `TERM=emacs exec zsh' in the file ~/bin/eshell. ought to work in either case, though for the FAQ I'd restate it as and then put #!/bin/sh TERM=emacs exec zsh in the file ~/bin/eshell, and `chmod +x ~/bin/eshell'. Finally I'd add (via Alain Caron ): If none of the above works, place [[ -n "$EMACS" ]] && unsetopt zle in your $ZDOTDIR/.zshrc file. If you want to say something about terminal mode: [[ -n "$EMACS" ]] && { [[ "$TERM" = eterm ]] && TERM=vt100 || unsetopt zle } } 3.16: How does the alternative loop syntax, e.g. `while {...} {...}' work? I agree with Zoltan's remarks about this; particularly about stronger admonition to avoid the short forms in scripts. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern