Merge branch 'split-out-org-faces.el'

Conflicts:

	ChangeLog
This commit is contained in:
Carsten Dominik 2008-04-09 15:45:00 +02:00
commit 84432821a5
7 changed files with 2088 additions and 1938 deletions

View File

@ -1,7 +1,16 @@
2008-04-09 Bastien Guerry <bzg@altern.org> 2008-04-09 Bastien Guerry <bzg@altern.org>
* lisp/org-mew.el (org-mew-open): Fixed the docstring. * lisp/org-mew.el (org-mew-open): Fixed the docstring.
2008-04-09 Carsten Dominik <dominik@science.uva.nl>
* lisp/org-colview.el: New file.
* lisp/org-archive.el: New file.
* lisp/org-faces.el: New file.
2008-04-08 Carsten Dominik <dominik@science.uva.nl> 2008-04-08 Carsten Dominik <dominik@science.uva.nl>
* lisp/org-exp.el (org-get-current-options): Incorporate LINK_UP, * lisp/org-exp.el (org-get-current-options): Incorporate LINK_UP,

View File

@ -61,11 +61,14 @@ CP = cp -p
# The following variables need to be defined by the maintainer # The following variables need to be defined by the maintainer
LISPF = org.el \ LISPF = org.el \
org-archive.el \
org-colview.el \
org-compat.el \ org-compat.el \
org-macs.el \ org-macs.el \
org-clock.el \ org-clock.el \
org-table.el \ org-table.el \
org-exp.el \ org-exp.el \
org-faces.el \
org-remember.el \ org-remember.el \
org-agenda.el \ org-agenda.el \
org-publish.el \ org-publish.el \

403
lisp/org-archive.el Normal file
View File

@ -0,0 +1,403 @@
;;; org-archive.el --- Archiving for Org-mode
;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.00pre-4
;;
;; This file is part of GNU Emacs.
;;
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;; This file contains the face definitons for Org.
;;; Code:
(require 'org)
(defcustom org-archive-location "%s_archive::"
"The location where subtrees should be archived.
Otherwise, the value of this variable is a string, consisting of two
parts, separated by a double-colon.
The first part is a file name - when omitted, archiving happens in the same
file. %s will be replaced by the current file name (without directory part).
Archiving to a different file is useful to keep archived entries from
contributing to the Org-mode Agenda.
The part after the double colon is a headline. The archived entries will be
filed under that headline. When omitted, the subtrees are simply filed away
at the end of the file, as top-level entries.
Here are a few examples:
\"%s_archive::\"
If the current file is Projects.org, archive in file
Projects.org_archive, as top-level trees. This is the default.
\"::* Archived Tasks\"
Archive in the current file, under the top-level headline
\"* Archived Tasks\".
\"~/org/archive.org::\"
Archive in file ~/org/archive.org (absolute path), as top-level trees.
\"basement::** Finished Tasks\"
Archive in file ./basement (relative path), as level 3 trees
below the level 2 heading \"** Finished Tasks\".
You may set this option on a per-file basis by adding to the buffer a
line like
#+ARCHIVE: basement::** Finished Tasks
You may also define it locally for a subtree by setting an ARCHIVE property
in the entry. If such a property is found in an entry, or anywhere up
the hierarchy, it will be used."
:group 'org-archive
:type 'string)
(defcustom org-attic-heading "Attic"
"Name of the local attic sibling that is used to archive entries locally.
Locally means: in the tree, under a sibling.
See `org-archive-to-attic-sibling' for more information."
:group 'org-archive
:type 'string)
(defcustom org-archive-mark-done t
"Non-nil means, mark entries as DONE when they are moved to the archive file.
This can be a string to set the keyword to use. When t, Org-mode will
use the first keyword in its list that means done."
:group 'org-archive
:type '(choice
(const :tag "No" nil)
(const :tag "Yes" t)
(string :tag "Use this keyword")))
(defcustom org-archive-stamp-time t
"Non-nil means, add a time stamp to entries moved to an archive file.
This variable is obsolete and has no effect anymore, instead add ot remove
`time' from the variablle `org-archive-save-context-info'."
:group 'org-archive
:type 'boolean)
(defcustom org-archive-save-context-info '(time file olpath category todo itags)
"Parts of context info that should be stored as properties when archiving.
When a subtree is moved to an archive file, it looses information given by
context, like inherited tags, the category, and possibly also the TODO
state (depending on the variable `org-archive-mark-done').
This variable can be a list of any of the following symbols:
time The time of archiving.
file The file where the entry originates.
itags The local tags, in the headline of the subtree.
ltags The tags the subtree inherits from further up the hierarchy.
todo The pre-archive TODO state.
category The category, taken from file name or #+CATEGORY lines.
olpath The outline path to the item. These are all headlines above
the current item, separated by /, like a file path.
For each symbol present in the list, a property will be created in
the archived entry, with a prefix \"PRE_ARCHIVE_\", to remember this
information."
:group 'org-archive
:type '(set :greedy t
(const :tag "Time" time)
(const :tag "File" file)
(const :tag "Category" category)
(const :tag "TODO state" todo)
(const :tag "TODO state" priority)
(const :tag "Inherited tags" itags)
(const :tag "Outline path" olpath)
(const :tag "Local tags" ltags)))
(defalias 'org-advertized-archive-subtree 'org-archive-subtree)
(defun org-archive-subtree (&optional find-done)
"Move the current subtree to the archive.
The archive can be a certain top-level heading in the current file, or in
a different file. The tree will be moved to that location, the subtree
heading be marked DONE, and the current time will be added.
When called with prefix argument FIND-DONE, find whole trees without any
open TODO items and archive them (after getting confirmation from the user).
If the cursor is not at a headline when this comand is called, try all level
1 trees. If the cursor is on a headline, only try the direct children of
this heading."
(interactive "P")
(if find-done
(org-archive-all-done)
;; Save all relevant TODO keyword-relatex variables
(let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler
(tr-org-todo-keywords-1 org-todo-keywords-1)
(tr-org-todo-kwd-alist org-todo-kwd-alist)
(tr-org-done-keywords org-done-keywords)
(tr-org-todo-regexp org-todo-regexp)
(tr-org-todo-line-regexp org-todo-line-regexp)
(tr-org-odd-levels-only org-odd-levels-only)
(this-buffer (current-buffer))
(org-archive-location org-archive-location)
(re "^#\\+ARCHIVE:[ \t]+\\(\\S-.*\\S-\\)[ \t]*$")
;; start of variables that will be used for saving context
;; The compiler complains about them - keep them anyway!
(file (abbreviate-file-name (buffer-file-name)))
(olpath (mapconcat 'identity (org-get-outline-path) "/"))
(time (format-time-string
(substring (cdr org-time-stamp-formats) 1 -1)
(current-time)))
afile heading buffer level newfile-p
category todo priority
;; start of variables that will be used for savind context
ltags itags prop)
;; Try to find a local archive location
(save-excursion
(save-restriction
(widen)
(setq prop (org-entry-get nil "ARCHIVE" 'inherit))
(if (and prop (string-match "\\S-" prop))
(setq org-archive-location prop)
(if (or (re-search-backward re nil t)
(re-search-forward re nil t))
(setq org-archive-location (match-string 1))))))
(if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location)
(progn
(setq afile (format (match-string 1 org-archive-location)
(file-name-nondirectory buffer-file-name))
heading (match-string 2 org-archive-location)))
(error "Invalid `org-archive-location'"))
(if (> (length afile) 0)
(setq newfile-p (not (file-exists-p afile))
buffer (find-file-noselect afile))
(setq buffer (current-buffer)))
(unless buffer
(error "Cannot access file \"%s\"" afile))
(if (and (> (length heading) 0)
(string-match "^\\*+" heading))
(setq level (match-end 0))
(setq heading nil level 0))
(save-excursion
(org-back-to-heading t)
;; Get context information that will be lost by moving the tree
(org-refresh-category-properties)
(setq category (org-get-category)
todo (and (looking-at org-todo-line-regexp)
(match-string 2))
priority (org-get-priority
(if (match-end 3) (match-string 3) ""))
ltags (org-get-tags)
itags (org-delete-all ltags (org-get-tags-at)))
(setq ltags (mapconcat 'identity ltags " ")
itags (mapconcat 'identity itags " "))
;; We first only copy, in case something goes wrong
;; we need to protect this-command, to avoid kill-region sets it,
;; which would lead to duplication of subtrees
(let (this-command) (org-copy-subtree))
(set-buffer buffer)
;; Enforce org-mode for the archive buffer
(if (not (org-mode-p))
;; Force the mode for future visits.
(let ((org-insert-mode-line-in-empty-file t)
(org-inhibit-startup t))
(call-interactively 'org-mode)))
(when newfile-p
(goto-char (point-max))
(insert (format "\nArchived entries from file %s\n\n"
(buffer-file-name this-buffer))))
;; Force the TODO keywords of the original buffer
(let ((org-todo-line-regexp tr-org-todo-line-regexp)
(org-todo-keywords-1 tr-org-todo-keywords-1)
(org-todo-kwd-alist tr-org-todo-kwd-alist)
(org-done-keywords tr-org-done-keywords)
(org-todo-regexp tr-org-todo-regexp)
(org-todo-line-regexp tr-org-todo-line-regexp)
(org-odd-levels-only
(if (local-variable-p 'org-odd-levels-only (current-buffer))
org-odd-levels-only
tr-org-odd-levels-only)))
(goto-char (point-min))
(show-all)
(if heading
(progn
(if (re-search-forward
(concat "^" (regexp-quote heading)
(org-re "[ \t]*\\(:[[:alnum:]_@:]+:\\)?[ \t]*\\($\\|\r\\)"))
nil t)
(goto-char (match-end 0))
;; Heading not found, just insert it at the end
(goto-char (point-max))
(or (bolp) (insert "\n"))
(insert "\n" heading "\n")
(end-of-line 0))
;; Make the subtree visible
(show-subtree)
(org-end-of-subtree t)
(skip-chars-backward " \t\r\n")
(and (looking-at "[ \t\r\n]*")
(replace-match "\n\n")))
;; No specific heading, just go to end of file.
(goto-char (point-max)) (insert "\n"))
;; Paste
(org-paste-subtree (org-get-valid-level level 1))
;; Mark the entry as done
(when (and org-archive-mark-done
(looking-at org-todo-line-regexp)
(or (not (match-end 2))
(not (member (match-string 2) org-done-keywords))))
(let (org-log-done org-todo-log-states)
(org-todo
(car (or (member org-archive-mark-done org-done-keywords)
org-done-keywords)))))
;; Add the context info
(when org-archive-save-context-info
(let ((l org-archive-save-context-info) e n v)
(while (setq e (pop l))
(when (and (setq v (symbol-value e))
(stringp v) (string-match "\\S-" v))
(setq n (concat "ARCHIVE_" (upcase (symbol-name e))))
(org-entry-put (point) n v)))))
;; Save and kill the buffer, if it is not the same buffer.
(if (not (eq this-buffer buffer))
(progn (save-buffer) (kill-buffer buffer)))))
;; Here we are back in the original buffer. Everything seems to have
;; worked. So now cut the tree and finish up.
(let (this-command) (org-cut-subtree))
(if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line))
(message "Subtree archived %s"
(if (eq this-buffer buffer)
(concat "under heading: " heading)
(concat "in file: " (abbreviate-file-name afile)))))))
(defun org-archive-to-attic-sibling ()
"Archive the current heading by moving it under the attic sibling.
The attic sibling is a sibling of the heading with the heading name
`org-attic-heading and an `org-archive-tag' tag. If this sibling does
not exist, it will be created at the end of the subtree."
(interactive)
(save-restriction
(widen)
(let (b e pos leader level)
(org-back-to-heading t)
(looking-at outline-regexp)
(setq leader (match-string 0)
level (funcall outline-level))
(setq pos (point))
(condition-case nil
(outline-up-heading 1 t)
(error (goto-char (point-min))))
(setq b (point))
(condition-case nil
(org-end-of-subtree t t)
(error (goto-char (point-max))))
(setq e (point))
(goto-char b)
(unless (re-search-forward
(concat "^" (regexp-quote leader)
"[ \t]*"
org-attic-heading
"[ \t]*:"
org-archive-tag ":") e t)
(goto-char e)
(or (bolp) (newline))
(insert leader org-attic-heading "\n")
(beginning-of-line 0)
(org-toggle-tag org-archive-tag 'on))
(beginning-of-line 1)
(org-end-of-subtree t t)
(save-excursion
(goto-char pos)
(org-cut-subtree))
(org-paste-subtree (org-get-valid-level level 1))
(org-set-property
"ARCHIVE_TIME"
(format-time-string
(substring (cdr org-time-stamp-formats) 1 -1)
(current-time)))
(outline-up-heading 1 t)
(hide-subtree)
(goto-char pos))))
(defun org-archive-all-done (&optional tag)
"Archive sublevels of the current tree without open TODO items.
If the cursor is not on a headline, try all level 1 trees. If
it is on a headline, try all direct children.
When TAG is non-nil, don't move trees, but mark them with the ARCHIVE tag."
(let ((re (concat "^\\*+ +" org-not-done-regexp)) re1
(rea (concat ".*:" org-archive-tag ":"))
(begm (make-marker))
(endm (make-marker))
(question (if tag "Set ARCHIVE tag (no open TODO items)? "
"Move subtree to archive (no open TODO items)? "))
beg end (cntarch 0))
(if (org-on-heading-p)
(progn
(setq re1 (concat "^" (regexp-quote
(make-string
(1+ (- (match-end 0) (match-beginning 0) 1))
?*))
" "))
(move-marker begm (point))
(move-marker endm (org-end-of-subtree t)))
(setq re1 "^* ")
(move-marker begm (point-min))
(move-marker endm (point-max)))
(save-excursion
(goto-char begm)
(while (re-search-forward re1 endm t)
(setq beg (match-beginning 0)
end (save-excursion (org-end-of-subtree t) (point)))
(goto-char beg)
(if (re-search-forward re end t)
(goto-char end)
(goto-char beg)
(if (and (or (not tag) (not (looking-at rea)))
(y-or-n-p question))
(progn
(if tag
(org-toggle-tag org-archive-tag 'on)
(org-archive-subtree))
(setq cntarch (1+ cntarch)))
(goto-char end)))))
(message "%d trees archived" cntarch)))
(defun org-toggle-archive-tag (&optional find-done)
"Toggle the archive tag for the current headline.
With prefix ARG, check all children of current headline and offer tagging
the children that do not contain any open TODO items."
(interactive "P")
(if find-done
(org-archive-all-done 'tag)
(let (set)
(save-excursion
(org-back-to-heading t)
(setq set (org-toggle-tag org-archive-tag))
(when set (hide-subtree)))
(and set (beginning-of-line 1))
(message "Subtree %s" (if set "archived" "unarchived")))))
(provide 'org-archive)
;;; org-archive.el ends here

1058
lisp/org-colview.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1851,9 +1851,11 @@ command."
;;; HTML export ;;; HTML export
(defvar org-archive-location) ;; gets loades with the org-archive require.
(defun org-get-current-options () (defun org-get-current-options ()
"Return a string with current options as keyword options. "Return a string with current options as keyword options.
Does include HTML export options as well as TODO and CATEGORY stuff." Does include HTML export options as well as TODO and CATEGORY stuff."
(require 'org-archive)
(format (format
"#+TITLE: %s "#+TITLE: %s
#+AUTHOR: %s #+AUTHOR: %s

449
lisp/org-faces.el Normal file
View File

@ -0,0 +1,449 @@
;;; org-faces.el --- Face definitions for Org-mode.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org
;; Version: 6.00pre-4
;;
;; This file is part of GNU Emacs.
;;
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;; This file contains the face definitons for Org.
;;; Code:
(require 'org-macs)
(require 'org-compat)
(defgroup org-faces nil
"Faces in Org-mode."
:tag "Org Faces"
:group 'org-font-lock)
(defface org-hide
'((((background light)) (:foreground "white"))
(((background dark)) (:foreground "black")))
"Face used to hide leading stars in headlines.
The forground color of this face should be equal to the background
color of the frame."
:group 'org-faces)
(defface org-level-1 ;; originally copied from font-lock-function-name-face
(org-compatible-face 'outline-1
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8)) (:foreground "blue" :bold t))
(t (:bold t))))
"Face used for level 1 headlines."
:group 'org-faces)
(defface org-level-2 ;; originally copied from font-lock-variable-name-face
(org-compatible-face 'outline-2
'((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
(((class color) (min-colors 8) (background light)) (:foreground "yellow"))
(((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
(t (:bold t))))
"Face used for level 2 headlines."
:group 'org-faces)
(defface org-level-3 ;; originally copied from font-lock-keyword-face
(org-compatible-face 'outline-3
'((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
(((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
(((class color) (min-colors 16) (background light)) (:foreground "Purple"))
(((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
(((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
(((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
(t (:bold t))))
"Face used for level 3 headlines."
:group 'org-faces)
(defface org-level-4 ;; originally copied from font-lock-comment-face
(org-compatible-face 'outline-4
'((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
(((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
(((class color) (min-colors 16) (background light)) (:foreground "red"))
(((class color) (min-colors 16) (background dark)) (:foreground "red1"))
(((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
(t (:bold t))))
"Face used for level 4 headlines."
:group 'org-faces)
(defface org-level-5 ;; originally copied from font-lock-type-face
(org-compatible-face 'outline-5
'((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
(((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
(((class color) (min-colors 8)) (:foreground "green"))))
"Face used for level 5 headlines."
:group 'org-faces)
(defface org-level-6 ;; originally copied from font-lock-constant-face
(org-compatible-face 'outline-6
'((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
(((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
(((class color) (min-colors 8)) (:foreground "magenta"))))
"Face used for level 6 headlines."
:group 'org-faces)
(defface org-level-7 ;; originally copied from font-lock-builtin-face
(org-compatible-face 'outline-7
'((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
(((class color) (min-colors 8)) (:foreground "blue"))))
"Face used for level 7 headlines."
:group 'org-faces)
(defface org-level-8 ;; originally copied from font-lock-string-face
(org-compatible-face 'outline-8
'((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
(((class color) (min-colors 8)) (:foreground "green"))))
"Face used for level 8 headlines."
:group 'org-faces)
(defface org-special-keyword ;; originally copied from font-lock-string-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
(t (:italic t))))
"Face used for special keywords."
:group 'org-faces)
(defface org-drawer ;; originally copied from font-lock-function-name-face
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8)) (:foreground "blue" :bold t))
(t (:bold t))))
"Face used for drawers."
:group 'org-faces)
(defface org-property-value nil
"Face used for the value of a property."
:group 'org-faces)
(defface org-column
(org-compatible-face nil
'((((class color) (min-colors 16) (background light))
(:background "grey90"))
(((class color) (min-colors 16) (background dark))
(:background "grey30"))
(((class color) (min-colors 8))
(:background "cyan" :foreground "black"))
(t (:inverse-video t))))
"Face for column display of entry properties."
:group 'org-faces)
(when (fboundp 'set-face-attribute)
;; Make sure that a fixed-width face is used when we have a column table.
(set-face-attribute 'org-column nil
:height (face-attribute 'default :height)
:family (face-attribute 'default :family)))
(defface org-warning
(org-compatible-face 'font-lock-warning-face
'((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
(((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
(((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
(t (:bold t))))
"Face for deadlines and TODO keywords."
:group 'org-faces)
(defface org-archived ; similar to shadow
(org-compatible-face 'shadow
'((((class color grayscale) (min-colors 88) (background light))
(:foreground "grey50"))
(((class color grayscale) (min-colors 88) (background dark))
(:foreground "grey70"))
(((class color) (min-colors 8) (background light))
(:foreground "green"))
(((class color) (min-colors 8) (background dark))
(:foreground "yellow"))))
"Face for headline with the ARCHIVE tag."
:group 'org-faces)
(defface org-link
'((((class color) (background light)) (:foreground "Purple" :underline t))
(((class color) (background dark)) (:foreground "Cyan" :underline t))
(t (:underline t)))
"Face for links."
:group 'org-faces)
(defface org-ellipsis
'((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
(((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
(t (:strike-through t)))
"Face for the ellipsis in folded text."
:group 'org-faces)
(defface org-target
'((((class color) (background light)) (:underline t))
(((class color) (background dark)) (:underline t))
(t (:underline t)))
"Face for links."
:group 'org-faces)
(defface org-date
'((((class color) (background light)) (:foreground "Purple" :underline t))
(((class color) (background dark)) (:foreground "Cyan" :underline t))
(t (:underline t)))
"Face for links."
:group 'org-faces)
(defface org-sexp-date
'((((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
(t (:underline t)))
"Face for links."
:group 'org-faces)
(defface org-tag
'((t (:bold t)))
"Face for tags."
:group 'org-faces)
(defface org-todo ; font-lock-warning-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
(((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
(((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
(t (:inverse-video t :bold t))))
"Face for TODO keywords."
:group 'org-faces)
(defface org-done ;; originally copied from font-lock-type-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
(((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
(((class color) (min-colors 8)) (:foreground "green"))
(t (:bold t))))
"Face used for todo keywords that indicate DONE items."
:group 'org-faces)
(defface org-headline-done ;; originally copied from font-lock-string-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
(((class color) (min-colors 8) (background light)) (:bold nil))))
"Face used to indicate that a headline is DONE.
This face is only used if `org-fontify-done-headline' is set. If applies
to the part of the headline after the DONE keyword."
:group 'org-faces)
(defcustom org-todo-keyword-faces nil
"Faces for specific TODO keywords.
This is a list of cons cells, with TODO keywords in the car
and faces in the cdr. The face can be a symbol, or a property
list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
:group 'org-faces
:group 'org-todo
:type '(repeat
(cons
(string :tag "keyword")
(sexp :tag "face"))))
(defface org-table ;; originally copied from font-lock-function-name-face
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8) (background light)) (:foreground "blue"))
(((class color) (min-colors 8) (background dark)))))
"Face used for tables."
:group 'org-faces)
(defface org-formula
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
(((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
(((class color) (min-colors 8) (background light)) (:foreground "red"))
(((class color) (min-colors 8) (background dark)) (:foreground "red"))
(t (:bold t :italic t))))
"Face for formulas."
:group 'org-faces)
(defface org-code
(org-compatible-face nil
'((((class color grayscale) (min-colors 88) (background light))
(:foreground "grey50"))
(((class color grayscale) (min-colors 88) (background dark))
(:foreground "grey70"))
(((class color) (min-colors 8) (background light))
(:foreground "green"))
(((class color) (min-colors 8) (background dark))
(:foreground "yellow"))))
"Face for fixed-with text like code snippets."
:group 'org-faces
:version "22.1")
(defface org-verbatim
(org-compatible-face nil
'((((class color grayscale) (min-colors 88) (background light))
(:foreground "grey50" :underline t))
(((class color grayscale) (min-colors 88) (background dark))
(:foreground "grey70" :underline t))
(((class color) (min-colors 8) (background light))
(:foreground "green" :underline t))
(((class color) (min-colors 8) (background dark))
(:foreground "yellow" :underline t))))
"Face for fixed-with text like code snippets."
:group 'org-faces
:version "22.1")
(defface org-agenda-structure ;; originally copied from font-lock-function-name-face
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
(((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 16) (background light)) (:foreground "Blue"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
(((class color) (min-colors 8)) (:foreground "blue" :bold t))
(t (:bold t))))
"Face used in agenda for captions and dates."
:group 'org-faces)
(unless (facep 'org-agenda-date)
(copy-face 'org-agenda-structure 'org-agenda-date)
(set-face-doc-string 'org-agenda-date
"Face used in agenda for normal days."))
(unless (facep 'org-agenda-date-weekend)
(copy-face 'org-agenda-date 'org-agenda-date-weekend)
(set-face-doc-string 'org-agenda-date-weekend
"Face used in agenda for weekend days.
See the variable `org-agenda-weekend-days' for a definition of which days
belong to the weekend.")
(when (fboundp 'set-face-attribute)
(set-face-attribute 'org-agenda-date-weekend nil :weight 'bold)))
(defface org-scheduled-today
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
(((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
(((class color) (min-colors 8)) (:foreground "green"))
(t (:bold t :italic t))))
"Face for items scheduled for a certain day."
:group 'org-faces)
(defface org-scheduled-previously
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
(((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
(((class color) (min-colors 8) (background light)) (:foreground "red"))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
(t (:bold t))))
"Face for items scheduled previously, and not yet done."
:group 'org-faces)
(defface org-upcoming-deadline
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
(((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
(((class color) (min-colors 8) (background light)) (:foreground "red"))
(((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
(t (:bold t))))
"Face for items scheduled previously, and not yet done."
:group 'org-faces)
(defcustom org-agenda-deadline-faces
'((1.0 . org-warning)
(0.5 . org-upcoming-deadline)
(0.0 . default))
"Faces for showing deadlines in the agenda.
This is a list of cons cells. The cdr of each cell is a face to be used,
and it can also just be like '(:foreground \"yellow\").
Each car is a fraction of the head-warning time that must have passed for
this the face in the cdr to be used for display. The numbers must be
given in descending order. The head-warning time is normally taken
from `org-deadline-warning-days', but can also be specified in the deadline
timestamp itself, like this:
DEADLINE: <2007-08-13 Mon -8d>
You may use d for days, w for weeks, m for months and y for years. Months
and years will only be treated in an approximate fashion (30.4 days for a
month and 365.24 days for a year)."
:group 'org-faces
:group 'org-agenda-daily/weekly
:type '(repeat
(cons
(number :tag "Fraction of head-warning time passed")
(sexp :tag "Face"))))
(defface org-agenda-restriction-lock
(org-compatible-face nil
'((((class color) (min-colors 88) (background light)) (:background "yellow1"))
(((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
(((class color) (min-colors 16) (background light)) (:background "yellow1"))
(((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
(((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
(t (:inverse-video t))))
"Face for showing the agenda restriction lock."
:group 'org-faces)
(defface org-time-grid ;; originally copied from font-lock-variable-name-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
(((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
(((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
"Face used for time grids."
:group 'org-faces)
(defconst org-level-faces
'(org-level-1 org-level-2 org-level-3 org-level-4
org-level-5 org-level-6 org-level-7 org-level-8
))
(defcustom org-n-level-faces (length org-level-faces)
"The number of different faces to be used for headlines.
Org-mode defines 8 different headline faces, so this can be at most 8.
If it is less than 8, the level-1 face gets re-used for level N+1 etc."
:type 'number
:group 'org-faces)
(defface org-latex-and-export-specials
(let ((font (cond ((assq :inherit custom-face-attributes)
'(:inherit underline))
(t '(:underline t)))))
`((((class grayscale) (background light))
(:foreground "DimGray" ,@font))
(((class grayscale) (background dark))
(:foreground "LightGray" ,@font))
(((class color) (background light))
(:foreground "SaddleBrown"))
(((class color) (background dark))
(:foreground "burlywood"))
(t (,@font))))
"Face used to highlight math latex and other special exporter stuff."
:group 'org-faces)
(provide 'org-faces)
;;; org-faces.el ends here

File diff suppressed because it is too large Load Diff