zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@ifh.de>,
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: Short loops?
Date: Thu, 27 Feb 1997 10:16:13 -0800	[thread overview]
Message-ID: <970227101613.ZM19757@candle.brasslantern.com> (raw)
In-Reply-To: Peter Stephenson <pws@ifh.de> "Re: Short loops?" (Feb 27, 10:32am)

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 <alainc@nortel.ca>):

   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


      parent reply	other threads:[~1997-02-27 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-26  2:13 Bart Schaefer
1997-02-26 16:10 ` Zoltan T. Hidvegi
1997-02-26 17:11   ` Bart Schaefer
1997-02-26 17:26     ` Zoltan T. Hidvegi
1997-02-26 19:09       ` Bart Schaefer
1997-02-26 19:27         ` Zoltan T. Hidvegi
1997-02-26 21:14           ` Bart Schaefer
1997-02-27  9:32             ` Peter Stephenson
1997-02-27 15:06               ` Zoltan T. Hidvegi
1997-02-27 18:16               ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=970227101613.ZM19757@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=pws@ifh.de \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).