robbyrussell/oh-my-zsh — pull request #999 by ChaosData (2012-03-07 13:25:33+00:00)
Title: Auto title now disabled in emacs term mode

Emacs term mode has issues with the method of terminal titling used. It will print out the fully expanded command and/or the title line before and/or after commands are executed. This will happen regardless of whether or not a theme is in use, however themes may cause additional output.
ex:
chaosdata@box:~% ls
2;ls --color=tty;ls

Emacs term mode adds, among other things, an environmental variable "EMACS" set to a version string (ex "23.3.1 (term:0.96)" ). I changed the logic in title to determine whether or not the terminal emulator is Emacs, and then not set a title if the former is true.