I have no problems starting Emacs from a terminal, while if I start it from the desktop (I have a desktop file containing emacsclient -ca ''
) Emacs starts with a putt-ugly font (see below a screenshot).
To debug the issue I started emacsclient
from the command line and, again see below for the transcript, I've got
Warning (initialization): An error occurred while loading ‘/home/boffi/.emacs’:
Wrong type argument: font, unspecified
BUT when I start Emacs directly I have no problems at all, emacsclient
does not recognize --debug-init
and the error message is not meaningful to me...
Moreover, if I visit the "broken" Emacs and I type M-x load-file RET ~/.emacs RET
my init file is executed w/o problems!
What can be done to fix this issue?
The Emacs version is apparent from the 1st screenshot, I'm on Debian Sid, fairly current.
17:46 boffi@debian:~ $ emacs --debug-init
17:46 boffi@debian:~ $ # see screenshot
17:47 boffi@debian:~ $ emacsclient -ca ''
emacsclient: can't find socket; have you started the server?
To start the server in Emacs, type "M-x server-start".
Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/00debian.el (source)...done
Loading /etc/emacs/site-start.d/50asymptote.el (source)...
Loading /etc/emacs/site-start.d/50asymptote.el (source)...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50figlet.el (source)...
Loading /etc/emacs/site-start.d/50figlet.el (source)...done
Loading /etc/emacs/site-start.d/50latexmk.el (source)...
Loading /etc/emacs/site-start.d/50latexmk.el (source)...done
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...done
Loading /home/boffi/.emacs.d/synctex.el (source)...
Loading /home/boffi/.emacs.d/synctex.el (source)...done
Warning (initialization): An error occurred while loading ‘/home/boffi/.emacs’:
Wrong type argument: font, unspecified
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
Starting Emacs daemon.
Emacs daemon should have started, trying to connect again
Waiting for Emacs...
17:48 boffi@debian:~ $ # see screenshot