Column view: Exclude archived trees, for speed.

This commit is contained in:
Carsten Dominik 2009-03-21 15:11:12 +01:00
parent 7924dcb1bf
commit d9d7398edd
5 changed files with 20 additions and 2 deletions

View File

@ -1092,6 +1092,10 @@ temporarily included.
Archived trees are not exported (@pxref{Exporting}), only the headline
is. Configure the details using the variable
@code{org-export-with-archived-trees}.
@item
@vindex org-columns-skip-arrchived-trees
Archived trees are excluded from column view unless the variable
@code{org-columns-skip-arrchived-trees} is configured to @code{nil}.
@end itemize
The following commands help managing the ARCHIVE tag:

View File

@ -1,5 +1,7 @@
2009-03-21 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-columns-skip-arrchived-trees): New option.
* org-agenda.el (org-agenda-export-html-style): Define color for
org-agenda-done face.
(org-search-view, org-agenda-get-todos, org-agenda-get-progress)

View File

@ -855,7 +855,10 @@ around it."
(narrow-to-region beg end)
(org-clock-sum))))
(while (re-search-forward (concat "^" outline-regexp) end t)
(push (cons (org-current-line) (org-entry-properties)) cache))
(if (and org-columns-skip-arrchived-trees
(looking-at (concat ".*:" org-archive-tag ":")))
(org-end-of-subtree t)
(push (cons (org-current-line) (org-entry-properties)) cache)))
(when cache
(setq maxwidths (org-columns-get-autowidth-alist fmt cache))
(org-set-local 'org-columns-current-maxwidths maxwidths)

View File

@ -673,7 +673,10 @@ around it."
(narrow-to-region beg end)
(org-clock-sum))))
(while (re-search-forward (concat "^" outline-regexp) end t)
(push (cons (org-current-line) (org-entry-properties)) cache))
(if (and org-columns-skip-arrchived-trees
(looking-at (concat ".*:" org-archive-tag ":")))
(org-end-of-subtree t)
(push (cons (org-current-line) (org-entry-properties)) cache)))
(when cache
(setq maxwidths (org-columns-get-autowidth-alist fmt cache))
(org-set-local 'org-columns-current-maxwidths maxwidths)

View File

@ -3066,6 +3066,12 @@ Instead, use the key `v' to cycle the archives-mode in the agenda."
:group 'org-agenda-skip
:type 'boolean)
(defcustom org-columns-skip-arrchived-trees t
"Non-nil means, irgnore archived trees when creating column view."
:group 'org-archive
:group 'org-properties
:type 'boolean)
(defcustom org-cycle-open-archived-trees nil
"Non-nil means, `org-cycle' will open archived trees.
An archived tree is a tree marked with the tag ARCHIVE.