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

Re: problem with GNU Emacs shell mode



On Feb 27,  9:37am, Alain Caron wrote:
} Subject: Re: problem with GNU Emacs shell mode
}
} Emacs sets the EMACS environment variable to "t" in shell buffers.
} 
} Maybe ZSH should also kick its "I'm-inside-emacs" initialization when
} the EMACS variable is set to "t".

This might be good, but how do we decide whether to do it when EMACS
is set to something other than `t'?

Terminal mode sets the EMACS variable to the emacs version number plus
the term-mode version number, and sets the terminal type to "eterm".
The eterm type works better when zle is off, too (but a better fix is
to reset TERM=vt100 and leave zle on).

} Another solution, is to put sthe following in your .zshrc
} 
} if [[ "$EMACS" == "t" ]]; then
} 
}   # initialization for an emacs shell-buffer
} 
}   unsetopt zle
}   ...
} 
} fi
} 
} I prefer this solution to the ones you proposed but this probably is a
} matter of taste.

I prefer the pre-startup reset of TERM only because zsh might change to
do or require something in addition to unset zle when running inside emacs
(e.g., it would be nice if zsh knew not to print ^G characters in its
correction prompts, and not to expect cbreak mode to work -- but those
restrictions don't apply to term-mode).

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern



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