org-faces.el 32 KB

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