【发布时间】:2012-01-02 12:13:39
【问题描述】:
如果我运行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
【问题讨论】:
-
关于这件事的任何消息,你最后有没有发现任何有用的东西?我遇到了类似的问题,即 emacsclient 不会加载颜色主题,但 emacs 会很高兴地应用我的紫色光标。
标签: emacs emacs-faces