summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernt Hansen <bernt@norang.ca>2008-12-02 15:25:45 -0500
committerBernt Hansen <bernt@norang.ca>2009-01-13 19:03:08 -0500
commitd075718333d50cf582359162a89d3bab72b030f2 (patch)
tree539c9dc582dad49799f6409e96982d0bd9b422e2
parent6de54f877de133b661841b26059dd2ff71736f41 (diff)
downloadorg-mode-d075718333d50cf582359162a89d3bab72b030f2.tar.gz
Call org-reveal after archiving
Sometimes archiving a task displays the next task heading after ... at the end of a folded task. This keeps the next task the cursor is on starting in column 1 which feels more natural.
-rw-r--r--lisp/org-archive.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index d37f843..6ae6743 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -306,7 +306,8 @@ this heading."
(message "Subtree archived %s"
(if (eq this-buffer buffer)
(concat "under heading: " heading)
- (concat "in file: " (abbreviate-file-name afile)))))))
+ (concat "in file: " (abbreviate-file-name afile))))))
+ (org-reveal))
(defun org-archive-to-archive-sibling ()
"Archive the current heading by moving it under the archive sibling.
@@ -357,7 +358,8 @@ sibling does not exist, it will be created at the end of the subtree."
(outline-up-heading 1 t)
(hide-subtree)
(org-cycle-show-empty-lines 'folded)
- (goto-char pos))))
+ (goto-char pos)))
+ (org-reveal))
(defun org-archive-all-done (&optional tag)
"Archive sublevels of the current tree without open TODO items.