summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Lundin <mclundin@gmail.com>2017-11-25 09:26:15 -0600
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-11-26 10:52:03 +0100
commit63f6e851bcecfe8de50782e75f173211445a49a3 (patch)
treea20831a5695bf78b6e6d179a83f1e475b333cf3a
parent6aac798f2556041113d72d79ddc68d7d27017e38 (diff)
downloadorg-mode-63f6e851bcecfe8de50782e75f173211445a49a3.tar.gz
Do not save target buffer after archiving subtree
* lisp/org-archive.el: (org-archive-subtree) Do not save buffer after each archive. Saving the archive buffer after archiving each subtree results in substantial slowdown and many writes to disk when archiving an active region. This brings the behavior of org-archive-subtree into line with org-refile, which does not save the target buffer after refiling.
-rw-r--r--lisp/org-archive.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 0337617..01514d7 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -381,10 +381,7 @@ direct children of this heading."
(point)
(concat "ARCHIVE_" (upcase (symbol-name item)))
value))))
- (widen)
- ;; Save and kill the buffer, if it is not the same
- ;; buffer.
- (unless (eq this-buffer buffer) (save-buffer)))))
+ (widen))))
;; Here we are back in the original buffer. Everything seems
;; to have worked. So now run hooks, cut the tree and finish
;; up.