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

标签 emacs org-mode dot-emacs

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/

相关文章:

emacs - 在swank-clojure repl中模仿花括号匹配

pdf - 如何在 Evince 中以 Org 模式打开 PDF 文件?

emacs - 无法在组织模式下正确禁用 Flyspell

emacs 删除选择模式自行禁用

Emacs 口齿不清 : get RGB components of face?

emacs - 在 Emacs org-mode 中保存待办事项列表会删除所有纯文本吗?

emacs - 打开 org-protocol 时如何将焦点放在 emacsclient 窗口?

emacs - 如何获取Emacs组织模式完成的统计信息以通过非待办事项标题进行过滤?

emacs - 删除一个单词而不将其添加到 Emacs 中的终止环中

emacs - xemacs : dotemacs config so that one can paste without getting "funny" chars