emacs -nw -q or emacs -nw -Q takes more than 10 seconds to start in terminal, but the result of M-x emacs-init-time is 0.0 seconds, and the emacs takes shorter time (still more than 5s) than emacs -nw -q or emacs -nw -Q and the result M-x emacs-init-time is 3.5 seconds, this is really weird.

Does anyone know what is going on?


CentOS 6.5 32-bit

GNU Emacs 24.4.2 (compiled from the source code at the official gnu website)

  • 1
    I take it the regular emacs from the CentOS repos does not have this problem? What flags did you build with?
    – PythonNut
    Mar 31, 2015 at 4:41
  • Default ./configure ; make ; sudo make install
    – CodyChan
    Mar 31, 2015 at 7:45
  • Does the regular emacs as packaged for CentOS exhibit the same problem?
    – user2005
    Mar 31, 2015 at 11:59
  • @rekado Actually the compiled Emacs is not like this slow in the beginning, than I installed some libraries because of company's needs and configured my KDE environment a bit, after I restarted my computer, it became slow, but I don't think that will affect Emacs, I didn't installed the Emacs from the ISO file since it is v32.1, so I cannot get the result, but I think it is normal. And the configuration is directly copied from my personal Fedora 21 environment because my working computer cannot get the access to the internet, so the el files are not re-compiled, I'll re-compile them tomorrow.
    – CodyChan
    Mar 31, 2015 at 12:30

2 Answers 2


One slow startup problem is usually that you don't have your machines fully qualified hostname declared in /etc/hosts which causes emacs to hang at some syscall during startup. However, that would not explain why emacs is faster than emacs -Q.

  • I had the same problem and solved it by adding machine name (not fully qualified) to /etc/hosts as a synonym for localhost. strace revealed that it used before 5 seconds opening an IP connection and another 4+4 seconds in two ioctls and still some seconds in other handling of these connections. Now it starts immediately. Feb 21, 2016 at 18:06

I'd try running it under strace: strace -o /tmp/yow emacs -Q -nw then look at /tmp/yow and you should get an idea of where it's hanging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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