Enable emacs to work in a terminal