When I run emacs
, everything is Ok, my init.el
is read. However, after starting a daemon (emacs --daemon
), an emacsclient GUI frame (emacsclient -c
) is not configured for the following setting:
- font size
(set-face-attribute 'default nil :font "Inconsolata-12.5")
- icons in the mode line (doom mode line)
(use-package doom-modeline
:init (doom-modeline-mode 1))
- ivy package (until I use it)
(use-package ivy
:diminish
:bind (("C-s" . swiper)
:map ivy-minibuffer-map
("TAB" . ivy-alt-done)
("C-l" . ivy-alt-done)
("C-j" . ivy-next-line)
("C-k" . ivy-previous-line)
:map ivy-switch-buffer-map
("C-k" . ivy-previous-line)
("C-l" . ivy-done)
("C-d" . ivy-switch-buffer-kill)
:map ivy-reverse-i-search-map
("C-k" . ivy-previous-line)
("C-d" . ivy-reverse-i-search-kill))
:config
(ivy-mode 1))
Here (emacs --daemon is not loading gui elements) and Here (Opening frames from emacs-daemon) it is mentioned that Emacs daemon doesn't know about the graphical frame, so every/some option that is needed for GUI is sort of neglected. In my init.el
I commented out every line that has that option, but it didn't help.
I couldn't find anything helpful in the manuals of emacs and emacsclient.
Is there any arguments that should I add when starting Emacs daemon (other than --daemon
) or emacsclient (other than -c
)? or I have to edit init.el file?
Debian Buster/Sid -- Emacs version: 27.1
set-face-attribute
fromafter-make-frame-functions
? The Emacs daemon reads youruser-init-file
with a dummy initial frame that is never shown, so settings against that frame don't usually affect normal frames created thereafter withemacsclient -t
oremacsclient -c
. – Basil Nov 5 '20 at 13:41(add-hook 'after-make-frame-functions (lambda (f) (set-face-attribute 'default f :font "Inconsolata-12.5")))
– Basil Nov 6 '20 at 7:23(info "(emacs) Fonts")
for preferred ways of changing the font. – Basil Nov 6 '20 at 7:25