I don't want to get sidetracked too much here, but emacs -nw (in my opinion) ought to open a graphical instance of emacs, with a popup. However, foregoing the -nw switch will bring up the GUI, and an embedded CLI version is implied by the new window switch?

Anyway, can I make this

emacs myfunscript.py

run as this

emacs myfunscript.py -nw

and keep my business on the command line, where I've grown to like it?


2 Answers 2


I think -nw stands for no window. Anyway you could make a shell alias, eg in bash

alias emacs='emacs -nw'
  • Yeah that did it. Note the space between alias emacs and the lack of space between emacs=''. At first it wasn't working, it's a sensitive command. Also, this had to go in .bashrc.
    – yurisich
    May 5, 2012 at 14:21

For the people who compile their emacs from sources, specify --without-x like this:

cd <downloaded emacs source>
./configure --without-x
make clean
sudo make install

(Optional) While we're at it, I like to disable some semi-related features as well. This is for emacs-27.2:

./configure --without-x --with-x-toolkit=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
make clean
sudo make install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .