emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] org-archive-subtree and heading level


From: igrek
Subject: [Orgmode] org-archive-subtree and heading level
Date: Fri, 27 Feb 2009 16:32:48 +0300
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

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

reply via email to

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