org-archive: Speed-up archiving subtrees

* lisp/org-archive.el (org-toggle-archive-tag): Use `org-flag-subtree',
  which is much faster than outline-hide-subtree'.

Reported-by: Michael Ziems <michael.ziems@xiron.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105005>
This commit is contained in:
Nicolas Goaziou 2016-02-11 00:47:55 +01:00
parent 07ee690dce
commit 6e88bf07d1
1 changed files with 1 additions and 1 deletions

View File

@ -565,7 +565,7 @@ the children that do not contain any open TODO items."
(save-excursion
(org-back-to-heading t)
(setq set (org-toggle-tag org-archive-tag))
(when set (outline-hide-subtree)))
(when set (org-flag-subtree t)))
(and set (beginning-of-line 1))
(message "Subtree %s" (if set "archived" "unarchived"))))))