Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Emacs in the same window as command line

Tags:

emacs

frame

How to make Emacs to be started by emacs in the same window as command line? I can do it by typing emacs -nw, but can I put a line into .emacs so that it would work automatically?

like image 484
Alex Avatar asked Feb 10 '10 20:02

Alex


1 Answers

The short answer is "no".

By the time your .emacs is read, the choice whether to use a graphical or non-graphical display has been made.

Perhaps a shell alias would better suit your needs

alias emacs 'emacs -nw'

You can verify this by adding

(y-or-n-p "Sourcing .emacs...")

at the top of your .emacs and run both graphical and non-graphical variants of Emacs, either way you get prompted after the Emacs has come up (graphically or non-graphically).

like image 190
Trey Jackson Avatar answered Sep 18 '22 20:09

Trey Jackson