emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-archive-subtree and heading level


From: Carsten Dominik
Subject: Re: [Orgmode] org-archive-subtree and heading level
Date: Fri, 27 Feb 2009 16:49:08 +0100

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.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode





reply via email to

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