Browse Source

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>
Nicolas Goaziou 4 years ago
parent
commit
6e88bf07d1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-archive.el

+ 1 - 1
lisp/org-archive.el

@@ -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"))))))