On Apr 4, 2010, at 8:42 AM, Tom wrote:

I put an ARCHIVE tag to the beginning of an org file:

#+ARCHIVE: ::* archive


and archived subtrees are put correctly under the archive heading
in the same file.

The problem is archiving opens all subtrees in the file and leaves them open and it messes up my nicely folded file. I have to refold the trees
manually to the previous state.

Is it a bug? Why does archiving open unrelated subtrees at all
except for the "archive" tree?

Because normally archiving goes to a different file, where this
would not be a problem.  But you can try this patch and run with
it for a while, to see if it causes any problems.  Please report back.

diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 3889207..c0f01da 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -263,7 +263,6 @@ this heading."
                   org-odd-levels-only
                 tr-org-odd-levels-only)))
          (goto-char (point-min))
-         (show-all)
          (if heading
              (progn
                (if (re-search-forward



And if it does shouldn't it restore
the previous folding state when it's finished?

Because there is currently no way to save and restore a folding state.

- Carsten



_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to