I am looking to switch to Emacs from Vim and one thing that is keeping me away is that Emacs opens up a separate window of its own when run under X. Can I get the same behavior for Emacs as it does when not run under X? That is, I want Emacs to start the session in the same terminal as the one in which its fired.

Let me know if the question is not clear. Thank in advance!

link|improve this question
feedback

migrated from stackoverflow.com Dec 3 '09 at 12:01

This question came from our site for professional and enthusiast programmers.

4 Answers

I'm no emacs expert, but this did the trick for me:

emacs -nw
link|improve this answer
2  
You're right, for the curious -nw is short for --no-window-system which tells emacs not to use its X interface. – Mic Dec 3 '09 at 10:46
Great! Thank You. – Amit Dec 3 '09 at 10:46
@Mic: Thanks for the explanation, this way I'll remember what it stands for – Alberto Zaccagni Dec 3 '09 at 10:47
feedback

You might prefer starting emacs as emacs --daemon and then using emacsclient -t to edit files. This keeps Emacs loaded in the background, so that you can use Emacs more like vi. Editing sessions will start up instantly, and "quitting" via C-x C-c will just close the current connection. It is very nice.

link|improve this answer
1  
Did not know about that, thanks – Alberto Zaccagni Dec 3 '09 at 12:01
Thanks. just a note: this is available with Emacs 23+ – Amit Saha Dec 3 '09 at 14:13
feedback

Although your question has been answered, I would venture to say that this is not the way any regular user would use emacs. Unlike vim, emacs generally has a longer startup time and anyway tends to be running all the time with multiple open buffers. So when you want to do something with emacs in a terminal, you invoke emacsclient -nw (assuming an emacs serverhas been started). Look at How to start to use EmacsClient for details.

link|improve this answer
feedback

If you use bash, you can always add the following to your .bashrc

alias emacs="emacs -nw"

That's saved me a lot of typing (and cursing when I forget to type the switches).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.