How to set emacsclient background as Emacs background?

百般思念 提交于 2019-12-01 07:15:45

问题


I've got (in my .emacs)

(set-background-color "#101416")
(set-foreground-color "#f6f3e8")

And I've got 2 bindings:

alias ex='emacsclient -nw'
alias ec='emacsclient -c -a ""'

ex works fine to open client in terminal but when I want to open it as a frame I've got white background :(

Why and how can I use my dark background there?


回答1:


set-background-color and set-foreground-color only affect the current frame, and your .emacs file is not executed when running emacsclient.

Try setting the variable default-frame-alist ("Alist of default values for frame creation") instead:

(setq default-frame-alist
      '((background-color . "#101416")
        (foreground-color . "#f6f3e8")))


来源:https://stackoverflow.com/questions/9271930/how-to-set-emacsclient-background-as-emacs-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!