Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had the same problem, though it affected emacs -nw as well (didn't try emacs-nox). Also, using nouveau not the blob. Anyway, that turned out to be orthogonal to the actual issue in my case. For a possible solution, skip to the end. I did:

ltrace emacs

and stopped it at when Emacs "hung" to see what library calls were being made. The last chunk of relevant output was:

access("/usr/share/emacs/23.3/etc/charse"..., 0) = 0
gethostname("MYHOSTNAME", 255)                    = 0
index("MYHOSTNAME", '.')                          = NULL
getaddrinfo("MYHOSTNAME", NULL, 0x7fffab63a9d0, 0x7fffab63aa00 <unfinished ...>
(3, 0x3203823260, 2054, -1, 0)                   = 0x3203823260
(0, 0, 0, 3, 0x7f2f6d1f6040)                     = 0x3203823260
(3, 0x3203823260, 2054, -1, 0)                   = 0x3203823260
(0, 0, 0, 3, 0x7f2f6cff34a8)                     = 0x3203823260
(3, 0x3203823260, 2054, -1, 0)                   = 0x3203823260
(0, 0, 0, 4, 0x7f2f6cdeb718)                     = 0x3203823260

where MYHOSTNAME represents my true hostname. The last call to getaddrinfo suggested that the pause was due to a delay in resolving my hostname to an IP, or something like that. At this point, there could be a couple of solutions, some more correct than others.

What I did:

I pinged my hostname, and found that it was resolving to the IP on my local network after a similarly long pause. So, I just added my hostname to the 127.0.0.1 line in /etc/hosts. Et voilĂ : Emacs started up quickly. Well as quickly as your init file allows :)

To any commenters reading this: I would be interested if there's a better solution.