Yes, this is a bug, thanks for the patch, I have applied it.
- Carsten
On Feb 27, 2009, at 2:32 PM, igrek wrote:
Hello,
when I archive a subtree as a top-level tree org-archive-subtree
adds an extra level to the heading. Is that by-design or a bug? For
the later case I have a patch.
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 2609367..c1200dd 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -270,7 +270,7 @@ this heading."
;; No specific heading, just go to end of file.
(goto-char (point-max)) (insert "\n"))
;; Paste
- (org-paste-subtree (org-get-valid-level level 1))
+ (org-paste-subtree (org-get-valid-level level (and heading 1)))
;; Mark the entry as done
(when (and org-archive-mark-done
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode