如果我运行
如果我使用
我在
emacs --daemon
(在.xinitrc
或之后),然后运行emacsclient -c
,新创建的窗口的光标颜色是黑色,无论颜色主题或其他设置如何。更确切地说,在我输入任何内容之前,光标的颜色是白色(或其他颜色),但是随着第一次按键,它变成了黑色,并且无法通过set-cursor-color
来改变颜色。默认和我的自定义配色方案都是黑色,因此这使得编辑非常不舒服。如果我使用
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