Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problem with GNU Emacs shell mode
- X-seq: zsh-users 729
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "James B. Crigler" <crigler@xxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: problem with GNU Emacs shell mode
- Date: Thu, 27 Feb 1997 12:48:56 -0800
- Cc: schaefer@xxxxxxx
- In-reply-to: "James B. Crigler" <crigler@xxxxxxx> "Re: problem with GNU Emacs shell mode" (Feb 27, 2:15pm)
- References: <199702271915.OAA09047@xxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Feb 27, 2:15pm, James B. Crigler wrote:
> Subject: Re: problem with GNU Emacs shell mode
>
> Bart> ;; Don't set TERM=dumb, it bugs zsh.
> Bart>
> Bart> (require 'comint)
> Bart> (defun comint-exec-1 (name buffer command switches)
[...]
> Bart> )
>
> This also works.
I suspect this means that you normally use comint for emacs shell-mode,
and that's why the (setenv "TERM" ...) didn't work. Here's an excerpt
from what I sent to zsh-workers, which will probably appear in the FAQ
in some form or other:
On Feb 27, 10:16am, Bart Schaefer wrote:
> On Feb 27, 10:32am, Peter Stephenson wrote:
> }
> } 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.
>
> [...] I'd add (via Alain Caron <alainc@xxxxxxxxx>):
>
> 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
> }
Messages sorted by:
Reverse Date,
Date,
Thread,
Author