emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Archiving in same file opens all subtrees and leaves them


From: Carsten Dominik
Subject: Re: [Orgmode] Archiving in same file opens all subtrees and leaves them open
Date: Sun, 4 Apr 2010 08:53:15 +0200


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]