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