I defined emacsclient as default editor in .bashrc so emacs -daemon will be called upon startup:

export EDITOR=emacsclient

But compared to a normal load without client, if I call emacsclient afile, then some ui elements are missing, like the scrollbar, which will disappear, and the speedbar pictures, which will be replaced with "+" sign. Apparently the init file is not fully loaded by emacs daemon? What could possibly caused the difference and how can it be fixed?

enter image description here

a) Above is a normal load with emacs afile, same with emacs ; emacsclient -c afile.

b) Below is a client load with emacsclient -c afile after emacs --daemon &

1 Answer 1


I imagine you have code running at init time which checks to see whether or not you are running a GUI emacs (via display-graphic-p or similar), and configures certain settings based on that.

(display-graphic-p) returns t at init time when a GUI non-daemon Emacs starts, because a graphical frame is created beforehand; but that function call returns nil at init time when a daemon starts, as no GUI frame is current at that time (and obviously the daemon has no idea whether any GUI frames are ever going to exist).

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.