zsh-users
 help / color / mirror / code / Atom feed
* problem with GNU Emacs shell mode
@ 1997-02-26 21:00 Jerry Jackson
  1997-02-27  1:22 ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Jerry Jackson @ 1997-02-26 21:00 UTC (permalink / raw)
  To: zsh-users

Hello,

I've been using zsh for a long time but when GNU Emacs changed 
comint mode around version 19.2x - 19.3x I started getting a lot
of spurious ^M's in my buffer.  I couldn't figure out how to fix
it and I reverted to Emacs version 19.21 for years.  I've since
moved on to a new job and I'd like to upgrade to the current Emacs.

Has anyone figured out how to fix this problem?  (I tried to look in
the mail archives but I couldn't get on to the FTP server.)

Surely someone else must be a shell mode user???

Thanks in advance,

Jerry Jackson


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: problem with GNU Emacs shell mode
@ 1997-02-27 14:37 Alain Caron
  1997-02-27 17:35 ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Alain Caron @ 1997-02-27 14:37 UTC (permalink / raw)
  To: schaefer; +Cc: jrj, zsh-users

In message "Re: problem with GNU Emacs shell mode",
'schaefer@nbn.com' writes:

>On Feb 26,  2:00pm, Jerry Jackson wrote:
>> Subject: problem with GNU Emacs shell mode
>>
>> I've been using zsh for a long time but when GNU Emacs changed
>> comint mode around version 19.2x - 19.3x I started getting a lot
>> of spurious ^M's in my buffer.  I couldn't figure out how to fix
>> it and I reverted to Emacs version 19.21 for years.
>
>Ouch!  Why didn't you ask sooner?
>
>> Has anyone figured out how to fix this problem?
>
>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".

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".

>
>Placing a
>
>(setenv "TERM" "emacs")
>
>in your ~/.emacs file seems to fix this.  If that confuses other programs
>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.
>

Another solution, is to put sthe following in your .zshrc


if [[ "$TERM" == "xterm"]]; then

   # initialization for an xterm
   ...


elif [[ "$EMACS" == "t" ]]; then

  # initialization for an emacs shell-buffer

  unsetopt zle
  ...

elsif [[ "${TERM%%-em[0-9]#}" == "emacs" ]]; then
   # running zsh under the emacs terminal-emulator...
   ...
else
   # default initialization: probably a vt100 emulator when dialing
   # from home.
   ...
fi

I prefer this solution to the ones you proposed but this probably is a
matter of taste.


Alain Caron
Nortel Technology, Montréal, Québec, Canada
email: alainc@nortel.ca
phone: 514-765-7718


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1997-02-27 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-26 21:00 problem with GNU Emacs shell mode Jerry Jackson
1997-02-27  1:22 ` Bart Schaefer
1997-02-27 14:38   ` James B. Crigler
1997-02-27 14:58     ` Peter Stephenson
1997-02-27 15:18       ` James B. Crigler
1997-02-27 17:43     ` Bart Schaefer
1997-02-27 19:15       ` James B. Crigler
1997-02-27 20:48         ` Bart Schaefer
1997-02-27 14:37 Alain Caron
1997-02-27 17:35 ` Bart Schaefer

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).