[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Solved: Emacs/gdb troubles (Was: I have ~/.terminfo !!)



Irk. I'm getting warmer. (Sorry for all the spam on this subject... sigh)

If I run emacs with TERMCAP set in my environment, gdb runs fine. If not, I
have problems. I usually start emacs from my window manager, which doesn't
have TERMCAP defined.

The following allows M-x gdb to work:

  TERMCAP="" emacs

The following doesn't:

  (unset TERMCAP; emacs)

Now all of this appears to be unrelated to the ^M problems I've been seeing in
M-x shell. That problem appears to be caused by some interaction between TERM
and zsh; bash doesn't exhibit the problem.

TERM is set to "unknown" in my shell buffers. If I set it to "emacs" I get a
warning about there not being any emacs termcap info, but the ^M chars go
away, although everything I type is repeated:

  (M-x shell)

  ^Mrob@deimos:~:[1]% echo $TERM
  echo $TERM^M^M
  ^Munknown
  ^Mrob@deimos:~:[2]% TERM=emacs
  TERM=emacs^M^M
  ^Mzsh: can't find termcap info for emacs
  rob@deimos:~:[3]% echo $TERM
  echo $TERM
  emacs
  rob@deimos:~:[4]% 

zsh uses the same ncurses library as bash:

  deimos:~:[293]% ldd =bash =zsh
  /bin/bash:
          libncurses.so.3.0 => /lib/libncurses.so.3.0
          libc.so.5 => /lib/libc.so.5.2.18
  /usr/bin/zsh:
          libncurses.so.3.0 => /lib/libncurses.so.3.0
          libc.so.5 => /lib/libc.so.5.2.18

Any more ideas? There are two distinct problems here, although the first one
apparently has a workaround (set TERMCAP before running emacs?).

-- 
Robert Leslie
rob@mars.org


Reply to: