如果我運行的是emacs --daemon
(在.xinitrc
或更高版本中),然後是emacsclient -c
,則新創建的幀具有黑色光標顏色,而不考慮colortheme或任何其他設置。更準確地說,在我輸入任何東西之前,光標顏色是白色(或其他顏色),但是第一個按鍵變成黑色並且不能通過set-cursor-color
進行更改。默認和我的自定義colorthemes都是黑色的,所以它使編輯非常不舒服。無法在emacsclient中更改光標顏色
如果我運行emacs
和M-x server-start
而不是emacs --daemon
,則不會出現此問題。但這種方式我需要保持一個emacs「主」框架,而不是順便殺死它,這似乎不是一個很好的解決方案。
我在.emacs.d/init.el
以下塊,但它並不能幫助:
(set-cursor-color "red")
(setq initial-frame-alist '((cursor-color . "red")))
(setq default-frame-alist '((cursor-color . "red")))
(add-hook 'window-setup-hook '(lambda() (set-cursor-color "red")))
(add-hook 'after-make-frame-functions '(lambda (f) (with-selected-frame f (set-cursor-color "red"))))
如果我跑M-x describe-face RET cursor
我得到:
(...)
Defined in `faces.el'.
Family: unspecified
Foundry: unspecified
Width: unspecified
Height: unspecified
Weight: unspecified
Slant: unspecified
Foreground: unspecified
Background: black
Underline: unspecified
Overline: unspecified
Strike-through: unspecified
Box: unspecified
Inverse: unspecified
Stipple: unspecified
Font: unspecified
Fontset: unspecified
Inherit: unspecified
關於這個問題的任何消息,你有沒有發現什麼工作到底?我遇到了一個類似的問題,emacsclient不會加載color-theme,但emacs會很高興地應用我的紫色光標。 – kristianlm