Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird character zsh in emacs terminal

Tags:

emacs

macos

zsh

When using the terminal in emacs (M-x term) under MacOS for some reason it always posts the characters 4m before every line in zsh and always prints 2 lines containing the user info such as

4m--(jesus@laptop:/dir)---- 4m--(jesus@laptop:/dir)---- prompt> 

It's more of an annoyance than anything but I was just wondering if there's a way to fix this. I also seem to have issues in Zsh in Mac OS emacs terminal mode when a lot of output is written to it it seems to reduce it all to one line and constantly overwrite the same line (may be related as the 4m is possibly just a special character that emacs is treating differently which can affect formatting).

If need be I can post my .zshrc and .emacs files.

like image 574
Jesus Ramos Avatar asked Jan 18 '12 23:01

Jesus Ramos


1 Answers

You don't have eterm-color terminfo. First, you try to add following S-exp in your configuration file and evaluate.

;; Use Emacs terminfo, not system terminfo (setq system-uses-terminfo nil) 

If problem is not resolved previous setting, you should create eterm-color terminfo by using following command. (terminfo path may different from your system)

# If you use Cocoa Emacs or Carbon Emacs tic -o ~/.terminfo /Applications/Emacs.app/Contents/Resources/etc/e/eterm-color.ti 
like image 89
syohex Avatar answered Sep 22 '22 07:09

syohex