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