org-faces.el (28685B)
1 ;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*- 2 3 ;; Copyright (C) 2004-2024 Free Software Foundation, Inc. 4 5 ;; Author: Carsten Dominik <carsten.dominik@gmail.com> 6 ;; Keywords: outlines, hypermedia, calendar, text 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 '((t :inherit default)) 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-row '((t :inherit org-table)) 393 "Face used to fontify whole table rows (including newlines and indentation)." 394 :group 'org-faces) 395 396 (defface org-table-header '((t :inherit org-table 397 :background "LightGray" 398 :foreground "Black")) 399 "Face for table header." 400 :group 'org-faces) 401 402 (defface org-formula 403 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) 404 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) 405 (((class color) (min-colors 8) (background light)) (:foreground "red")) 406 (((class color) (min-colors 8) (background dark)) (:foreground "red")) 407 (t (:bold t :italic t))) 408 "Face for formulas." 409 :group 'org-faces) 410 411 (defface org-code '((t :inherit shadow)) 412 "Face for fixed-width text like code snippets." 413 :group 'org-faces 414 :version "22.1") 415 416 (defface org-meta-line '((t :inherit font-lock-comment-face)) 417 "Face for meta lines starting with \"#+\"." 418 :group 'org-faces 419 :version "22.1") 420 421 (defface org-document-title 422 '((((class color) (background light)) (:foreground "midnight blue" :weight bold)) 423 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold)) 424 (t (:weight bold))) 425 "Face for document title, i.e. that which follows the #+TITLE: keyword." 426 :group 'org-faces) 427 428 (defface org-document-info 429 '((((class color) (background light)) (:foreground "midnight blue")) 430 (((class color) (background dark)) (:foreground "pale turquoise")) 431 (t nil)) 432 "Face for document information such as the author and date. 433 This applies to the text that follows a #+SUBTITLE:, #+DATE:, 434 #+AUTHOR: or #+EMAIL: keyword." 435 :group 'org-faces) 436 437 (defface org-document-info-keyword '((t :inherit shadow)) 438 "Face for document information keywords. 439 This face applies to the #+TITLE:, #+SUBTITLE:, #+AUTHOR:, 440 #+EMAIL: and #+DATE: keywords." 441 :group 'org-faces) 442 443 (defface org-block `((t :inherit shadow 444 ,@(and (>= emacs-major-version 27) '(:extend t)))) 445 "Face used for text inside various blocks. 446 447 It is always used for source blocks. You can refine what face 448 should be used depending on the source block language by setting, 449 `org-src-block-faces', which takes precedence. 450 451 When `org-fontify-quote-and-verse-blocks' is not nil, text inside 452 verse and quote blocks are fontified using the `org-verse' and 453 `org-quote' faces, which inherit from `org-block'." 454 :group 'org-faces 455 :version "26.1") 456 457 (defface org-block-begin-line '((t (:inherit org-meta-line))) 458 "Face used for the line delimiting the begin of source blocks." 459 :group 'org-faces) 460 461 (defface org-block-end-line '((t (:inherit org-block-begin-line))) 462 "Face used for the line delimiting the end of source blocks." 463 :group 'org-faces) 464 465 (defface org-inline-src-block '((t (:inherit org-block))) 466 "Face used for inline source blocks as a whole." 467 :group 'org-faces) 468 469 (defface org-verbatim '((t (:inherit shadow))) 470 "Face for fixed-with text like code snippets." 471 :group 'org-faces 472 :version "22.1") 473 474 (defface org-quote '((t (:inherit org-block))) 475 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks. 476 Active when `org-fontify-quote-and-verse-blocks' is set." 477 :group 'org-faces) 478 479 (defface org-verse '((t (:inherit org-block))) 480 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks. 481 Active when `org-fontify-quote-and-verse-blocks' is set." 482 :group 'org-faces) 483 484 (defcustom org-fontify-quote-and-verse-blocks nil 485 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block. 486 When nil, format these as normal Org. This is the default, because the 487 content of these blocks will still be treated as Org syntax." 488 :group 'org-faces 489 :version "24.1" 490 :type 'boolean) 491 492 (defface org-clock-overlay ;Copied from `secondary-selection' 493 '((((class color) (min-colors 88) (background light)) 494 (:background "LightGray" :foreground "black")) 495 (((class color) (min-colors 88) (background dark)) 496 (:background "SkyBlue4" :foreground "white")) 497 (((class color) (min-colors 16) (background light)) 498 (:background "gray" :foreground "black")) 499 (((class color) (min-colors 16) (background dark)) 500 (:background "SkyBlue4" :foreground "white")) 501 (((class color) (min-colors 8)) 502 (:background "cyan" :foreground "black")) 503 (t (:inverse-video t))) 504 "Basic face for displaying the secondary selection." 505 :group 'org-faces) 506 507 (defface org-agenda-structure ;Copied from `font-lock-function-name-face' 508 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) 509 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) 510 (((class color) (min-colors 16) (background light)) (:foreground "Blue")) 511 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) 512 (((class color) (min-colors 8)) (:foreground "blue" :bold t)) 513 (t (:bold t))) 514 "Face used in agenda for captions and dates." 515 :group 'org-faces) 516 517 (defface org-agenda-structure-secondary '((t (:inherit org-agenda-structure))) 518 "Face used for secondary information in agenda block headers." 519 :group 'org-faces) 520 521 (defface org-agenda-structure-filter '((t (:inherit (org-warning org-agenda-structure)))) 522 "Face used for the current type of task filter in the agenda. 523 It inherits from `org-agenda-structure' so it can adapt to 524 it (e.g. if that is assigned a different font height or family)." 525 :group 'org-faces) 526 527 (defface org-agenda-date '((t (:inherit org-agenda-structure))) 528 "Face used in agenda for normal days." 529 :group 'org-faces) 530 531 (defface org-agenda-date-today 532 '((t (:inherit org-agenda-date :weight bold :italic t))) 533 "Face used in agenda for today." 534 :group 'org-faces) 535 536 (defface org-agenda-date-weekend-today '((t (:inherit org-agenda-date-today))) 537 "Face used in agenda for today during weekends." 538 :group 'org-faces) 539 540 (defface org-agenda-clocking '((t (:inherit secondary-selection))) 541 "Face marking the current clock item in the agenda." 542 :group 'org-faces) 543 544 (defface org-agenda-date-weekend '((t (:inherit org-agenda-date :weight bold))) 545 "Face used in agenda for weekend days. 546 547 See the variable `org-agenda-weekend-days' for a definition of 548 which days belong to the weekend." 549 :group 'org-faces) 550 551 (defface org-scheduled 552 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")) 553 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) 554 (((class color) (min-colors 8)) (:foreground "green")) 555 (t (:bold t :italic t))) 556 "Face for items scheduled for a certain day." 557 :group 'org-faces) 558 559 (defface org-scheduled-today 560 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")) 561 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) 562 (((class color) (min-colors 8)) (:foreground "green")) 563 (t (:bold t :italic t))) 564 "Face for items scheduled for a certain day." 565 :group 'org-faces) 566 567 (defface org-agenda-dimmed-todo-face 568 '((((background light)) (:foreground "grey50")) 569 (((background dark)) (:foreground "grey50"))) 570 "Face used to dim blocked tasks in the agenda." 571 :group 'org-faces) 572 573 (defface org-scheduled-previously 574 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) 575 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) 576 (((class color) (min-colors 8) (background light)) (:foreground "red")) 577 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) 578 (t (:bold t))) 579 "Face for items scheduled previously, and not yet done." 580 :group 'org-faces) 581 582 (defface org-imminent-deadline '((t :inherit org-warning)) 583 "Face for current deadlines in the agenda. 584 See also `org-agenda-deadline-faces'." 585 :group 'org-faces) 586 587 (defface org-upcoming-deadline 588 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) 589 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) 590 (((class color) (min-colors 8) (background light)) (:foreground "red")) 591 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) 592 (t (:bold t))) 593 "Face for items scheduled previously, and not yet done. 594 See also `org-agenda-deadline-faces'." 595 :group 'org-faces) 596 597 (defface org-upcoming-distant-deadline '((t :inherit org-default)) 598 "Face for items scheduled previously, not done, and have a distant deadline. 599 See also `org-agenda-deadline-faces'.") 600 601 (defcustom org-agenda-deadline-faces 602 '((1.0 . org-imminent-deadline) 603 (0.5 . org-upcoming-deadline) 604 (0.0 . org-upcoming-distant-deadline)) 605 "Faces for showing deadlines in the agenda. 606 This is a list of cons cells. The cdr of each cell is a face to be used, 607 and it can also just be like (:foreground \"yellow\"). 608 Each car is a fraction of the head-warning time that must have passed for 609 this the face in the cdr to be used for display. The numbers must be 610 given in descending order. The head-warning time is normally taken 611 from `org-deadline-warning-days', but can also be specified in the deadline 612 timestamp itself, like this: 613 614 DEADLINE: <2007-08-13 Mon -8d> 615 616 You may use d for days, w for weeks, m for months and y for years. Months 617 and years will only be treated in an approximate fashion (30.4 days for a 618 month and 365.24 days for a year)." 619 :group 'org-faces 620 :group 'org-agenda-daily/weekly 621 :type '(repeat 622 (cons 623 (number :tag "Fraction of head-warning time passed") 624 (sexp :tag "Face")))) 625 626 (defface org-agenda-restriction-lock 627 '((((class color) (min-colors 88) (background light)) (:background "#eeeeee")) 628 (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C")) 629 (((class color) (min-colors 16) (background light)) (:background "#eeeeee")) 630 (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C")) 631 (((class color) (min-colors 8)) (:background "cyan" :foreground "black")) 632 (t (:inverse-video t))) 633 "Face for showing the agenda restriction lock." 634 :group 'org-faces) 635 636 (defface org-agenda-filter-tags '((t :inherit mode-line)) 637 "Face for tag(s) in the mode-line when filtering the agenda." 638 :group 'org-faces) 639 640 (defface org-agenda-filter-category '((t :inherit mode-line)) 641 "Face for categories in the mode-line when filtering the agenda." 642 :group 'org-faces) 643 644 (defface org-agenda-filter-effort '((t :inherit mode-line)) 645 "Face for effort in the mode-line when filtering the agenda." 646 :group 'org-faces) 647 648 (defface org-agenda-filter-regexp '((t :inherit mode-line)) 649 "Face for regexp(s) in the mode-line when filtering the agenda." 650 :group 'org-faces) 651 652 (defface org-time-grid ;Copied from `font-lock-variable-name-face' 653 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) 654 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) 655 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))) 656 "Face used for time grids." 657 :group 'org-faces) 658 659 (defface org-agenda-current-time '((t (:inherit org-time-grid))) 660 "Face used to show the current time in the time grid." 661 :group 'org-faces) 662 663 (defface org-agenda-diary '((t :inherit default)) 664 "Face used for agenda entries that come from the Emacs diary." 665 :group 'org-faces) 666 667 (defface org-agenda-calendar-daterange '((t :inherit default)) 668 "Face used to show entries with a date range in the agenda." 669 :group 'org-faces) 670 671 (defface org-agenda-calendar-event '((t :inherit default)) 672 "Face used to show events and appointments in the agenda." 673 :group 'org-faces) 674 675 (defface org-agenda-calendar-sexp '((t :inherit default)) 676 "Face used to show events computed from a S-expression." 677 :group 'org-faces) 678 679 (defconst org-level-faces 680 '(org-level-1 org-level-2 org-level-3 org-level-4 681 org-level-5 org-level-6 org-level-7 org-level-8)) 682 683 (defcustom org-n-level-faces (length org-level-faces) 684 "The number of different faces to be used for headlines. 685 Org mode defines 8 different headline faces, so this can be at most 8. 686 If it is less than 8, the level-1 face gets reused for level N+1 etc." 687 :type 'integer 688 :group 'org-faces) 689 690 (defcustom org-cycle-level-faces t 691 "Non-nil means level styles cycle after level `org-n-level-faces'. 692 Then so level org-n-level-faces+1 is styled like level 1. 693 If nil, then all levels >= `org-n-level-faces' are styled like 694 level `org-n-level-faces'." 695 :group 'org-appearance 696 :group 'org-faces 697 :version "24.1" 698 :type 'boolean) 699 700 (defface org-latex-and-related 701 (let ((font (cond ((assq :inherit custom-face-attributes) 702 '(:inherit underline)) 703 (t '(:underline t))))) 704 `((((class grayscale) (background light)) 705 (:foreground "DimGray" ,@font)) 706 (((class grayscale) (background dark)) 707 (:foreground "LightGray" ,@font)) 708 (((class color) (background light)) 709 (:foreground "SaddleBrown")) 710 (((class color) (background dark)) 711 (:foreground "burlywood")) 712 (t (,@font)))) 713 "Face used to highlight LaTeX data, entities and sub/superscript." 714 :group 'org-faces 715 :version "24.4" 716 :package-version '(Org . "8.0")) 717 718 (defface org-macro '((t :inherit org-latex-and-related)) 719 "Face for macros." 720 :group 'org-faces 721 :version "24.4" 722 :package-version '(Org . "8.0")) 723 724 (defface org-tag-group '((t :inherit org-tag)) 725 "Face for group tags." 726 :group 'org-faces 727 :version "24.4" 728 :package-version '(Org . "8.0")) 729 730 (defface org-mode-line-clock '((t (:inherit mode-line))) 731 "Face used for clock display in mode line." 732 :group 'org-faces) 733 734 (defface org-mode-line-clock-overrun 735 '((t (:inherit mode-line :background "red"))) 736 "Face used for clock display for overrun tasks in mode line." 737 :group 'org-faces) 738 739 (provide 'org-faces) 740 741 ;;; org-faces.el ends here