mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 22:47:56 +00:00
org-agenda.el (org-agenda-restriction-lock-highlight-subtree): New option
* org-faces.el (org-agenda-restriction-lock): Use less flashy colors. * org-agenda.el (org-agenda-restriction-lock-highlight-subtree): New option.
This commit is contained in:
parent
5fc6764c1f
commit
b37e27edb5
|
@ -657,6 +657,13 @@ that are marked with the ARCHIVE tag will be included anyway. When this is
|
|||
t, also all archive files associated with the current selection of agenda
|
||||
files will be included.")
|
||||
|
||||
(defcustom org-agenda-restriction-lock-highlight-subtree t
|
||||
"Non-nil means highlight the whole subtree when restriction is active.
|
||||
Otherwise only highlight the headline. Highlighting the whole subtree is
|
||||
useful to ensure no edits happen beyond the restricted region."
|
||||
:group 'org-agenda
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-agenda-skip-comment-trees t
|
||||
"Non-nil means skip trees that start with the COMMENT keyword.
|
||||
When nil, these trees are also scanned by agenda commands."
|
||||
|
@ -7072,7 +7079,10 @@ in the file. Otherwise, restriction will be to the current subtree."
|
|||
(list (buffer-file-name (buffer-base-buffer))))
|
||||
(org-back-to-heading t)
|
||||
(move-overlay org-agenda-restriction-lock-overlay
|
||||
(point) (point-at-eol))
|
||||
(point)
|
||||
(if org-agenda-restriction-lock-highlight-subtree
|
||||
(save-excursion (org-end-of-subtree t t) (point))
|
||||
(point-at-eol)))
|
||||
(move-marker org-agenda-restrict-begin (point))
|
||||
(move-marker org-agenda-restrict-end
|
||||
(save-excursion (org-end-of-subtree t t)))
|
||||
|
|
|
@ -693,10 +693,10 @@ month and 365.24 days for a year)."
|
|||
|
||||
(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 88) (background light)) (:background "#eeeeee"))
|
||||
(((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
|
||||
(((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
|
||||
(((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
|
||||
(((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
|
||||
(t (:inverse-video t))))
|
||||
"Face for showing the agenda restriction lock."
|
||||
|
|
Loading…
Reference in a new issue