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

Re: problem with GNU Emacs shell mode



On Feb 27,  9:38am, James B. Crigler wrote:
} Subject: Re: problem with GNU Emacs shell mode
}
} >>>>> "Bart" == Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> writes:
}  Bart> Placing a
}  Bart>     (setenv "TERM" "emacs")
}  Bart> in your ~/.emacs file seems to fix this.
} 
} Neither of these works for me.  I start a shell and get ^M's and "echo
} $TERM" still returns "dumb".  Next idea?

If you C-h v process-environment RET in emacs, what is TERM set to?  Maybe
you're stomping on the (setenv ...) with a (setq process-environment ...)
or some such, elsewhere?

Try this:

;; Don't set TERM=dumb, it bugs zsh.

(require 'comint)
(defun comint-exec-1 (name buffer command switches)
  (let ((process-environment
	 (nconc
	  (if (and (boundp 'system-uses-terminfo) system-uses-terminfo)
	      (list "EMACS=t" "TERM=emacs"
		    (format "COLUMNS=%d" (frame-width)))
	    (list "EMACS=t" "TERM=emacs"
		  (format "TERMCAP=emacs:co#%d:tc=unknown" (frame-width))))
	  process-environment)))
    (apply 'start-process name buffer command switches)))

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