Fix can't start emacs on terminal.