This is a known bug: Emacs-24 crashes at startup. Although this bug isn't strictly speaking specific to elementary OS, it is an incompatibility between the graphical toolkit used in the Emacs package on elementary OS and certain themes including the elementary theme, so it is far more likely to happen on elementary OS than elsewhere.
Dominic on the discussion of an old GTK+ bug notes that setting the environment variable
1 allows Emacs to start. I can confirm this. From the command line, you can thus run
To conveniently set this variable for Emacs only (don't set it globally as it can cause problem with other applications), you can create a launcher. To do that, open Files, navigate to
/usr/share/applications and copy the file “GNU Emacs 24”. Navigate to
~/.local/share/applications and paste the file. If you prefer the command line:
cp /usr/share/applications/emacs24.desktop ~/.local/share/applications
Open the file you just copied (
~/.local/share/applications/emacs24.desktop) in a text editor — if Emacs isn't working yet, Scratch will do.
Change the line
Exec=/usr/bin/env XLIB_SKIP_ARGB_VISUALS=1 emacs24 %F
You can now launch “GNU Emacs 24” from the launcher.
Similarly, if you start the Emacs daemon from your session startup, instead of running
emacs --daemon, run
XLIB_SKIP_ARGB_VISUALS=1 emacs --daemon