org-faces.el 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. ;;; org-faces.el --- Face definitions for Org-mode.
  2. ;; Copyright (C) 2004-2015 Free Software Foundation, Inc.
  3. ;; Author: Carsten Dominik <carsten at orgmode dot org>
  4. ;; Keywords: outlines, hypermedia, calendar, wp
  5. ;; Homepage: http://orgmode.org
  6. ;;
  7. ;; This file is part of GNU Emacs.
  8. ;;
  9. ;; GNU Emacs is free software: you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; GNU Emacs is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;
  21. ;;; Commentary:
  22. ;; This file contains the face definitions for Org.
  23. ;;; Code:
  24. (require 'org-macs)
  25. (require 'org-compat)
  26. (when (featurep 'xemacs)
  27. (put 'mode-line 'face-alias 'modeline))
  28. (defgroup org-faces nil
  29. "Faces in Org-mode."
  30. :tag "Org Faces"
  31. :group 'org-appearance)
  32. (defface org-default
  33. (org-compatible-face 'default nil)
  34. "Face used for default text."
  35. :group 'org-faces)
  36. (defface org-hide
  37. '((((background light)) (:foreground "white"))
  38. (((background dark)) (:foreground "black")))
  39. "Face used to hide leading stars in headlines.
  40. The foreground color of this face should be equal to the background
  41. color of the frame."
  42. :group 'org-faces)
  43. (defface org-level-1 ;; originally copied from font-lock-function-name-face
  44. (org-compatible-face 'outline-1
  45. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  46. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  47. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  48. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  49. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  50. (t (:bold t))))
  51. "Face used for level 1 headlines."
  52. :group 'org-faces)
  53. (defface org-level-2 ;; originally copied from font-lock-variable-name-face
  54. (org-compatible-face 'outline-2
  55. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  56. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  57. (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
  58. (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
  59. (t (:bold t))))
  60. "Face used for level 2 headlines."
  61. :group 'org-faces)
  62. (defface org-level-3 ;; originally copied from font-lock-keyword-face
  63. (org-compatible-face 'outline-3
  64. '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
  65. (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
  66. (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
  67. (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
  68. (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
  69. (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
  70. (t (:bold t))))
  71. "Face used for level 3 headlines."
  72. :group 'org-faces)
  73. (defface org-level-4 ;; originally copied from font-lock-comment-face
  74. (org-compatible-face 'outline-4
  75. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  76. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  77. (((class color) (min-colors 16) (background light)) (:foreground "red"))
  78. (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
  79. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  80. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  81. (t (:bold t))))
  82. "Face used for level 4 headlines."
  83. :group 'org-faces)
  84. (defface org-level-5 ;; originally copied from font-lock-type-face
  85. (org-compatible-face 'outline-5
  86. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  87. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  88. (((class color) (min-colors 8)) (:foreground "green"))))
  89. "Face used for level 5 headlines."
  90. :group 'org-faces)
  91. (defface org-level-6 ;; originally copied from font-lock-constant-face
  92. (org-compatible-face 'outline-6
  93. '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
  94. (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
  95. (((class color) (min-colors 8)) (:foreground "magenta"))))
  96. "Face used for level 6 headlines."
  97. :group 'org-faces)
  98. (defface org-level-7 ;; originally copied from font-lock-builtin-face
  99. (org-compatible-face 'outline-7
  100. '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
  101. (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
  102. (((class color) (min-colors 8)) (:foreground "blue"))))
  103. "Face used for level 7 headlines."
  104. :group 'org-faces)
  105. (defface org-level-8 ;; originally copied from font-lock-string-face
  106. (org-compatible-face 'outline-8
  107. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  108. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  109. (((class color) (min-colors 8)) (:foreground "green"))))
  110. "Face used for level 8 headlines."
  111. :group 'org-faces)
  112. (defface org-special-keyword ;; originally copied from font-lock-string-face
  113. (org-compatible-face 'font-lock-keyword-face
  114. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  115. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  116. (t (:italic t))))
  117. "Face used for special keywords."
  118. :group 'org-faces)
  119. (defface org-drawer ;; originally copied from font-lock-function-name-face
  120. (org-compatible-face nil
  121. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  122. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  123. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  124. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  125. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  126. (t (:bold t))))
  127. "Face used for drawers."
  128. :group 'org-faces)
  129. (defface org-property-value nil
  130. "Face used for the value of a property."
  131. :group 'org-faces)
  132. (defface org-column
  133. (org-compatible-face nil
  134. '((((class color) (min-colors 16) (background light))
  135. (:background "grey90" :weight normal :slant normal :strike-through nil
  136. :underline nil))
  137. (((class color) (min-colors 16) (background dark))
  138. (:background "grey30" :weight normal :slant normal :strike-through nil
  139. :underline nil))
  140. (((class color) (min-colors 8))
  141. (:background "cyan" :foreground "black"
  142. :weight normal :slant normal :strike-through nil
  143. :underline nil))
  144. (t (:inverse-video t))))
  145. "Face for column display of entry properties.
  146. This is actually only part of the face definition for the text in column view.
  147. The following faces apply, with this priority.
  148. 1. The color of the reference face. This is normally the level fact that
  149. is used in the outline. In agenda-mode, it will be the face of the
  150. first character in the line. The color is explicitly retained to
  151. make sure that the column line still looks a bit like the structure
  152. line it is masking.
  153. 2. The `org-column' face.
  154. 3. The remaining properties of the reference face.
  155. Since column view works by putting overlays with a display property
  156. over individual characters in the buffer, the face of the underlining
  157. character (this might for example be the a TODO keyword) might still
  158. shine through in some properties. So when your column view looks
  159. funny, with \"random\" colors, weight, strike-through, try to explicitly
  160. set the properties in the `org-column' face. For example, set
  161. :underline to nil, or the :slant to `normal'.
  162. Under XEmacs, the rules are simpler, because the XEmacs version of
  163. column view defines special faces for each outline level. See the file
  164. `org-colview-xemacs.el' in Org's contrib/ directory for details."
  165. :group 'org-faces)
  166. (defface org-column-title
  167. (org-compatible-face nil
  168. '((((class color) (min-colors 16) (background light))
  169. (:background "grey90" :underline t :weight bold))
  170. (((class color) (min-colors 16) (background dark))
  171. (:background "grey30" :underline t :weight bold))
  172. (((class color) (min-colors 8))
  173. (:background "cyan" :foreground "black" :underline t :weight bold))
  174. (t (:inverse-video t))))
  175. "Face for column display of entry properties."
  176. :group 'org-faces)
  177. (defface org-agenda-column-dateline
  178. (org-compatible-face 'org-column
  179. '((t nil)))
  180. "Face used in agenda column view for datelines with summaries."
  181. :group 'org-faces)
  182. (defface org-warning
  183. (org-compatible-face 'font-lock-warning-face
  184. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  185. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  186. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  187. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  188. (t (:bold t))))
  189. "Face for deadlines and TODO keywords."
  190. :group 'org-faces)
  191. (defface org-archived ; similar to shadow
  192. (org-compatible-face 'shadow
  193. '((((class color grayscale) (min-colors 88) (background light))
  194. (:foreground "grey50"))
  195. (((class color grayscale) (min-colors 88) (background dark))
  196. (:foreground "grey70"))
  197. (((class color) (min-colors 8) (background light))
  198. (:foreground "green"))
  199. (((class color) (min-colors 8) (background dark))
  200. (:foreground "yellow"))))
  201. "Face for headline with the ARCHIVE tag."
  202. :group 'org-faces)
  203. (defface org-link
  204. (org-compatible-face 'link
  205. '((((class color) (background light)) (:foreground "Purple" :underline t))
  206. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  207. (t (:underline t))))
  208. "Face for links."
  209. :group 'org-faces)
  210. (defface org-footnote
  211. '((((class color) (background light)) (:foreground "Purple" :underline t))
  212. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  213. (t (:underline t)))
  214. "Face for footnotes."
  215. :group 'org-faces)
  216. (defface org-ellipsis
  217. '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
  218. (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
  219. (t (:strike-through t)))
  220. "Face for the ellipsis in folded text."
  221. :group 'org-faces)
  222. (defface org-target
  223. '((((class color) (background light)) (:underline t))
  224. (((class color) (background dark)) (:underline t))
  225. (t (:underline t)))
  226. "Face for link targets."
  227. :group 'org-faces)
  228. (defface org-date
  229. '((((class color) (background light)) (:foreground "Purple" :underline t))
  230. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  231. (t (:underline t)))
  232. "Face for date/time stamps."
  233. :group 'org-faces)
  234. (defface org-date-selected
  235. (org-compatible-face nil
  236. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
  237. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
  238. (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
  239. (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
  240. (t (:inverse-video t))))
  241. "Face for highlighting the calendar day when using `org-read-date'.
  242. Using a bold face here might cause discrepancies while displaying the
  243. calendar."
  244. :group 'org-faces)
  245. (defface org-sexp-date
  246. '((((class color) (background light)) (:foreground "Purple"))
  247. (((class color) (background dark)) (:foreground "Cyan"))
  248. (t (:underline t)))
  249. "Face for diary-like sexp date specifications."
  250. :group 'org-faces)
  251. (defface org-tag
  252. '((t (:bold t)))
  253. "Default face for tags.
  254. Note that the variable `org-tag-faces' can be used to overrule this face for
  255. specific tags."
  256. :group 'org-faces)
  257. (defface org-list-dt
  258. '((t (:bold t)))
  259. "Default face for definition terms in lists."
  260. :group 'org-faces)
  261. (defface org-todo ; font-lock-warning-face
  262. (org-compatible-face nil
  263. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  264. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  265. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  266. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  267. (t (:inverse-video t :bold t))))
  268. "Face for TODO keywords."
  269. :group 'org-faces)
  270. (defface org-done ;; originally copied from font-lock-type-face
  271. (org-compatible-face nil
  272. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
  273. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
  274. (((class color) (min-colors 8)) (:foreground "green"))
  275. (t (:bold t))))
  276. "Face used for todo keywords that indicate DONE items."
  277. :group 'org-faces)
  278. (defface org-agenda-done ;; originally copied from font-lock-type-face
  279. (org-compatible-face nil
  280. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  281. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  282. (((class color) (min-colors 8)) (:foreground "green"))
  283. (t (:bold nil))))
  284. "Face used in agenda, to indicate lines switched to DONE.
  285. This face is used to de-emphasize items that where brightly colored in the
  286. agenda because they were things to do, or overdue. The DONE state itself
  287. is of course immediately visible, but for example a passed deadline is
  288. \(by default) very bright read. This face could be simply the default face
  289. of the frame, for example."
  290. :group 'org-faces)
  291. (defface org-headline-done ;; originally copied from font-lock-string-face
  292. (org-compatible-face nil
  293. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  294. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  295. (((class color) (min-colors 8) (background light)) (:bold nil))))
  296. "Face used to indicate that a headline is DONE.
  297. This face is only used if `org-fontify-done-headline' is set. If applies
  298. to the part of the headline after the DONE keyword."
  299. :group 'org-faces)
  300. (defcustom org-faces-easy-properties
  301. '((todo . :foreground) (tag . :foreground) (priority . :foreground))
  302. "The property changes by easy faces.
  303. This is an alist, the keys show the area of application, the values
  304. can be `:foreground' or `:background'. A color string for special
  305. keywords will then be interpreted as either foreground or background
  306. color."
  307. :group 'org-faces
  308. :group 'org-todo
  309. :version "24.1"
  310. :type '(repeat
  311. (cons (choice (const todo) (const tag) (const priority))
  312. (choice (const :foreground) (const :background)))))
  313. (defcustom org-todo-keyword-faces nil
  314. "Faces for specific TODO keywords.
  315. This is a list of cons cells, with TODO keywords in the car
  316. and faces in the cdr. The face can be a symbol, a color
  317. as a string (in which case the rest is inherited from the `org-todo' face),
  318. or a property list of attributes, like
  319. (:foreground \"blue\" :weight bold :underline t).
  320. If it is a color string, the variable `org-faces-easy-properties'
  321. determines if it is a foreground or a background color."
  322. :group 'org-faces
  323. :group 'org-todo
  324. :type '(repeat
  325. (cons
  326. (string :tag "Keyword")
  327. (choice :tag "Face "
  328. (string :tag "Color")
  329. (sexp :tag "Face")))))
  330. (defface org-priority ;; originally copied from font-lock-string-face
  331. (org-compatible-face 'font-lock-keyword-face
  332. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  333. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  334. (t (:italic t))))
  335. "Face used for priority cookies."
  336. :group 'org-faces)
  337. (defcustom org-priority-faces nil
  338. "Faces for specific Priorities.
  339. This is a list of cons cells, with priority character in the car
  340. and faces in the cdr. The face can be a symbol, a color as
  341. as a string, or a property list of attributes, like
  342. (:foreground \"blue\" :weight bold :underline t).
  343. If it is a color string, the variable `org-faces-easy-properties'
  344. determines if it is a foreground or a background color."
  345. :group 'org-faces
  346. :group 'org-todo
  347. :type '(repeat
  348. (cons
  349. (character :tag "Priority")
  350. (choice :tag "Face "
  351. (string :tag "Color")
  352. (sexp :tag "Face")))))
  353. (defvar org-tags-special-faces-re nil)
  354. (defun org-set-tag-faces (var value)
  355. (set var value)
  356. (if (not value)
  357. (setq org-tags-special-faces-re nil)
  358. (setq org-tags-special-faces-re
  359. (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
  360. (defface org-checkbox
  361. (org-compatible-face 'bold
  362. '((t (:bold t))))
  363. "Face for checkboxes."
  364. :group 'org-faces)
  365. (defface org-checkbox-statistics-todo
  366. '((t (:inherit org-todo)))
  367. "Face used for unfinished checkbox statistics."
  368. :group 'org-faces)
  369. (defface org-checkbox-statistics-done
  370. '((t (:inherit org-done)))
  371. "Face used for finished checkbox statistics."
  372. :group 'org-faces)
  373. (defcustom org-tag-faces nil
  374. "Faces for specific tags.
  375. This is a list of cons cells, with tags in the car and faces in the cdr.
  376. The face can be a symbol, a foreground color (in which case the rest is
  377. inherited from the `org-tag' face) or a property list of attributes,
  378. like (:foreground \"blue\" :weight bold :underline t).
  379. If you set this variable through customize, it will immediately be effective
  380. in new buffers and in modified lines.
  381. If you set it with Lisp, a restart of Emacs is required to activate the
  382. changes."
  383. :group 'org-faces
  384. :group 'org-tags
  385. :set 'org-set-tag-faces
  386. :type '(repeat
  387. (cons
  388. (string :tag "Tag ")
  389. (choice :tag "Face"
  390. (string :tag "Foreground color")
  391. (sexp :tag "Face")))))
  392. (defface org-table ;; originally copied from font-lock-function-name-face
  393. (org-compatible-face nil
  394. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  395. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  396. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  397. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  398. (((class color) (min-colors 8) (background light)) (:foreground "blue"))
  399. (((class color) (min-colors 8) (background dark)))))
  400. "Face used for tables."
  401. :group 'org-faces)
  402. (defface org-formula
  403. (org-compatible-face nil
  404. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  405. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  406. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  407. (((class color) (min-colors 8) (background dark)) (:foreground "red"))
  408. (t (:bold t :italic t))))
  409. "Face for formulas."
  410. :group 'org-faces)
  411. (defface org-code
  412. (org-compatible-face 'shadow
  413. '((((class color grayscale) (min-colors 88) (background light))
  414. (:foreground "grey50"))
  415. (((class color grayscale) (min-colors 88) (background dark))
  416. (:foreground "grey70"))
  417. (((class color) (min-colors 8) (background light))
  418. (:foreground "green"))
  419. (((class color) (min-colors 8) (background dark))
  420. (:foreground "yellow"))))
  421. "Face for fixed-width text like code snippets."
  422. :group 'org-faces
  423. :version "22.1")
  424. (defface org-meta-line
  425. (org-compatible-face 'font-lock-comment-face nil)
  426. "Face for meta lines starting with \"#+\"."
  427. :group 'org-faces
  428. :version "22.1")
  429. (defface org-document-title
  430. '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
  431. (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
  432. (t (:weight bold)))
  433. "Face for document title, i.e. that which follows the #+TITLE: keyword."
  434. :group 'org-faces)
  435. (defface org-document-info
  436. '((((class color) (background light)) (:foreground "midnight blue"))
  437. (((class color) (background dark)) (:foreground "pale turquoise"))
  438. (t nil))
  439. "Face for document date, author and email; i.e. that which
  440. follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
  441. :group 'org-faces)
  442. (defface org-document-info-keyword
  443. (org-compatible-face 'shadow
  444. '((((class color grayscale) (min-colors 88) (background light))
  445. (:foreground "grey50"))
  446. (((class color grayscale) (min-colors 88) (background dark))
  447. (:foreground "grey70"))
  448. (((class color) (min-colors 8) (background light))
  449. (:foreground "green"))
  450. (((class color) (min-colors 8) (background dark))
  451. (:foreground "yellow"))))
  452. "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
  453. :group 'org-faces)
  454. (defface org-block
  455. (org-compatible-face 'shadow
  456. '((((class color grayscale) (min-colors 88) (background light))
  457. (:foreground "grey50"))
  458. (((class color grayscale) (min-colors 88) (background dark))
  459. (:foreground "grey70"))
  460. (((class color) (min-colors 8) (background light))
  461. (:foreground "green"))
  462. (((class color) (min-colors 8) (background dark))
  463. (:foreground "yellow"))))
  464. "Face text in #+begin ... #+end blocks."
  465. :group 'org-faces
  466. :version "22.1")
  467. (defface org-block-begin-line
  468. '((t (:inherit org-meta-line)))
  469. "Face used for the line delimiting the begin of source blocks."
  470. :group 'org-faces)
  471. (defface org-block-end-line
  472. '((t (:inherit org-block-begin-line)))
  473. "Face used for the line delimiting the end of source blocks."
  474. :group 'org-faces)
  475. (defface org-verbatim
  476. (org-compatible-face 'shadow
  477. '((((class color grayscale) (min-colors 88) (background light))
  478. (:foreground "grey50" :underline t))
  479. (((class color grayscale) (min-colors 88) (background dark))
  480. (:foreground "grey70" :underline t))
  481. (((class color) (min-colors 8) (background light))
  482. (:foreground "green" :underline t))
  483. (((class color) (min-colors 8) (background dark))
  484. (:foreground "yellow" :underline t))))
  485. "Face for fixed-with text like code snippets."
  486. :group 'org-faces
  487. :version "22.1")
  488. (defface org-quote
  489. '((t (:inherit org-block)))
  490. "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks."
  491. :group 'org-faces)
  492. (defface org-verse
  493. '((t (:inherit org-block)))
  494. "Face for #+BEGIN_VERSE ... #+END_VERSE blocks."
  495. :group 'org-faces)
  496. (defcustom org-fontify-quote-and-verse-blocks nil
  497. "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
  498. When nil, format these as normal Org. This is the default, because the
  499. content of these blocks will still be treated as Org syntax."
  500. :group 'org-faces
  501. :version "24.1"
  502. :type 'boolean)
  503. (defface org-clock-overlay ;; copied from secondary-selection
  504. (org-compatible-face nil
  505. '((((class color) (min-colors 88) (background light))
  506. (:background "LightGray" :foreground "black"))
  507. (((class color) (min-colors 88) (background dark))
  508. (:background "SkyBlue4" :foreground "white"))
  509. (((class color) (min-colors 16) (background light))
  510. (:background "gray" :foreground "black"))
  511. (((class color) (min-colors 16) (background dark))
  512. (:background "SkyBlue4" :foreground "white"))
  513. (((class color) (min-colors 8))
  514. (:background "cyan" :foreground "black"))
  515. (t (:inverse-video t))))
  516. "Basic face for displaying the secondary selection."
  517. :group 'org-faces)
  518. (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
  519. (org-compatible-face nil
  520. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  521. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  522. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  523. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  524. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  525. (t (:bold t))))
  526. "Face used in agenda for captions and dates."
  527. :group 'org-faces)
  528. (defface org-agenda-date
  529. '((t (:inherit org-agenda-structure)))
  530. "Face used in agenda for normal days."
  531. :group 'org-faces)
  532. (defface org-agenda-date-today
  533. '((t (:inherit org-agenda-date :weight bold :italic t)))
  534. "Face used in agenda for today."
  535. :group 'org-faces)
  536. (defface org-agenda-clocking
  537. '((t (:inherit secondary-selection)))
  538. "Face marking the current clock item in the agenda."
  539. :group 'org-faces)
  540. (defface org-agenda-date-weekend
  541. '((t (:inherit org-agenda-date :weight bold)))
  542. "Face used in agenda for weekend days.
  543. See the variable `org-agenda-weekend-days' for a definition of
  544. which days belong to the weekend."
  545. :group 'org-faces)
  546. (defface org-scheduled
  547. (org-compatible-face nil
  548. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  549. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  550. (((class color) (min-colors 8)) (:foreground "green"))
  551. (t (:bold t :italic t))))
  552. "Face for items scheduled for a certain day."
  553. :group 'org-faces)
  554. (defface org-scheduled-today
  555. (org-compatible-face nil
  556. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  557. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  558. (((class color) (min-colors 8)) (:foreground "green"))
  559. (t (:bold t :italic t))))
  560. "Face for items scheduled for a certain day."
  561. :group 'org-faces)
  562. (defface org-agenda-dimmed-todo-face
  563. '((((background light)) (:foreground "grey50"))
  564. (((background dark)) (:foreground "grey50")))
  565. "Face used to dim blocked tasks in the agenda."
  566. :group 'org-faces)
  567. (defface org-scheduled-previously
  568. (org-compatible-face nil
  569. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  570. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  571. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  572. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  573. (t (:bold t))))
  574. "Face for items scheduled previously, and not yet done."
  575. :group 'org-faces)
  576. (defface org-upcoming-deadline
  577. (org-compatible-face nil
  578. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  579. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  580. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  581. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  582. (t (:bold t))))
  583. "Face for items scheduled previously, and not yet done."
  584. :group 'org-faces)
  585. (defcustom org-agenda-deadline-faces
  586. '((1.0 . org-warning)
  587. (0.5 . org-upcoming-deadline)
  588. (0.0 . default))
  589. "Faces for showing deadlines in the agenda.
  590. This is a list of cons cells. The cdr of each cell is a face to be used,
  591. and it can also just be like \\='(:foreground \"yellow\").
  592. Each car is a fraction of the head-warning time that must have passed for
  593. this the face in the cdr to be used for display. The numbers must be
  594. given in descending order. The head-warning time is normally taken
  595. from `org-deadline-warning-days', but can also be specified in the deadline
  596. timestamp itself, like this:
  597. DEADLINE: <2007-08-13 Mon -8d>
  598. You may use d for days, w for weeks, m for months and y for years. Months
  599. and years will only be treated in an approximate fashion (30.4 days for a
  600. month and 365.24 days for a year)."
  601. :group 'org-faces
  602. :group 'org-agenda-daily/weekly
  603. :type '(repeat
  604. (cons
  605. (number :tag "Fraction of head-warning time passed")
  606. (sexp :tag "Face"))))
  607. (defface org-agenda-restriction-lock
  608. (org-compatible-face nil
  609. '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
  610. (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
  611. (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
  612. (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
  613. (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
  614. (t (:inverse-video t))))
  615. "Face for showing the agenda restriction lock."
  616. :group 'org-faces)
  617. (defface org-agenda-filter-tags
  618. (org-compatible-face 'mode-line nil)
  619. "Face for tag(s) in the mode-line when filtering the agenda."
  620. :group 'org-faces)
  621. (defface org-agenda-filter-regexp
  622. (org-compatible-face 'mode-line nil)
  623. "Face for regexp(s) in the mode-line when filtering the agenda."
  624. :group 'org-faces)
  625. (defface org-agenda-filter-category
  626. (org-compatible-face 'mode-line nil)
  627. "Face for categories(s) in the mode-line when filtering the agenda."
  628. :group 'org-faces)
  629. (defface org-time-grid ;; originally copied from font-lock-variable-name-face
  630. (org-compatible-face nil
  631. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  632. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  633. (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
  634. "Face used for time grids."
  635. :group 'org-faces)
  636. (defface org-agenda-current-time
  637. '((t (:inherit org-time-grid)))
  638. "Face used to show the current time in the time grid."
  639. :group 'org-faces)
  640. (defface org-agenda-diary
  641. (org-compatible-face 'default nil)
  642. "Face used for agenda entries that come from the Emacs diary."
  643. :group 'org-faces)
  644. (defface org-agenda-calendar-event
  645. (org-compatible-face 'default nil)
  646. "Face used to show events and appointments in the agenda."
  647. :group 'org-faces)
  648. (defface org-agenda-calendar-sexp
  649. (org-compatible-face 'default nil)
  650. "Face used to show events computed from a S-expression."
  651. :group 'org-faces)
  652. (defconst org-level-faces
  653. '(org-level-1 org-level-2 org-level-3 org-level-4
  654. org-level-5 org-level-6 org-level-7 org-level-8
  655. ))
  656. (defcustom org-n-level-faces (length org-level-faces)
  657. "The number of different faces to be used for headlines.
  658. Org-mode defines 8 different headline faces, so this can be at most 8.
  659. If it is less than 8, the level-1 face gets re-used for level N+1 etc."
  660. :type 'integer
  661. :group 'org-faces)
  662. (defcustom org-cycle-level-faces t
  663. "Non-nil means level styles cycle after level `org-n-level-faces'.
  664. Then so level org-n-level-faces+1 is styled like level 1.
  665. If nil, then all levels >=org-n-level-faces are styled like
  666. level org-n-level-faces"
  667. :group 'org-appearance
  668. :group 'org-faces
  669. :version "24.1"
  670. :type 'boolean)
  671. (defface org-latex-and-related
  672. (let ((font (cond ((assq :inherit custom-face-attributes)
  673. '(:inherit underline))
  674. (t '(:underline t)))))
  675. `((((class grayscale) (background light))
  676. (:foreground "DimGray" ,@font))
  677. (((class grayscale) (background dark))
  678. (:foreground "LightGray" ,@font))
  679. (((class color) (background light))
  680. (:foreground "SaddleBrown"))
  681. (((class color) (background dark))
  682. (:foreground "burlywood"))
  683. (t (,@font))))
  684. "Face used to highlight LaTeX data, entities and sub/superscript."
  685. :group 'org-faces
  686. :version "24.4"
  687. :package-version '(Org . "8.0"))
  688. (defface org-macro
  689. (org-compatible-face 'org-latex-and-related nil)
  690. "Face for macros."
  691. :group 'org-faces
  692. :version "24.4"
  693. :package-version '(Org . "8.0"))
  694. (defface org-tag-group
  695. (org-compatible-face 'org-tag nil)
  696. "Face for group tags."
  697. :group 'org-faces
  698. :version "24.4"
  699. :package-version '(Org . "8.0"))
  700. (defface org-mode-line-clock
  701. '((t (:inherit mode-line)))
  702. "Face used for clock display in mode line."
  703. :group 'org-faces)
  704. (defface org-mode-line-clock-overrun
  705. '((t (:inherit mode-line :background "red")))
  706. "Face used for clock display for overrun tasks in mode line."
  707. :group 'org-faces)
  708. (provide 'org-faces)
  709. ;;; org-faces.el ends here