gpt4 book ai didi

emacs - 如何从 org-faces.el 覆盖模式行自定义?

转载 作者:行者123 更新时间:2023-12-02 01:54:27 27 4
gpt4 key购买 nike

org-faces.el 包含这段代码

(org-copy-face 'mode-line 'org-mode-line-clock
"Face used for clock display in mode line.")

;; ...snip...

(provide 'org-faces)

;;; org-faces.el ends here

这使得我的模式行(组织时钟显示)的右侧与“模式行”具有相同的面孔。我想使用我的 .emacs 更改此行为,以便组织时钟显示使用与“mode-line-inactive”相同的面孔。

我尝试将其添加到 .emacs 中:

(require 'org-faces) ;;necessary?
(org-copy-face 'mode-line-inactive 'org-mode-line-clock
"Face used for clock display in mode line."
:background "blue")
(provide 'org-faces) ;;necessary?

但是在评估 .emacs 之后模式行没有改变。我哪里错了?我对 Lisp 很陌生。感谢您的帮助。

最佳答案

你应该重新定义脸,就像我为“org-todo”所做的那样:

(set-face-attribute 'org-todo nil
:weight 'bold :box '(:line-width 1 :color "#D8ABA7")
:foreground "#D8ABA7" :background "#FFE6E4")

您可以(或者必须,也许,取决于您放置上述行的位置)保留对 org-faces 的要求,但显然不是提供行。

或者,使用可以改进 Org 使用的颜色主题(例如我的 Emacs Leuven 主题,请参阅 https://github.com/fniessen/emacs-leuven-theme ),最终根据您的喜好对其进行自定义。

关于emacs - 如何从 org-faces.el 覆盖模式行自定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20979553/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com