.emacs Edit to Always Start Emacs in Terminal Mode?

templatetypedef picture templatetypedef · Jan 5, 2011 · Viewed 15.8k times · Source

I use emacs as my editor-of-choice, and since I'm doing a lot of work in a terminal I always run emacs as

emacs -nw

so that it runs in the terminal instead of in a window.

I'd like to just run emacs and have it know that it should run in a terminal. My question is - how do I edit my .emacs file so that this is the default behavior?

Answer

rjray picture rjray · Jan 5, 2011

You can't do this in the .emacs file. By the time that file is being parsed, the "chosen" emacs binary is already running.

You can install the emacs-nox package as one commenter suggests, or create an alias in your shell so that "emacs" is always treated as "emacs -nw".

Randy