From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-archive-subtree and heading level Date: Fri, 27 Feb 2009 16:49:08 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ld4xe-0003rR-86 for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 10:49:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ld4xc-0003q1-OR for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 10:49:13 -0500 Received: from [199.232.76.173] (port=39675 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ld4xc-0003pu-Ih for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 10:49:12 -0500 Received: from yx-out-1718.google.com ([74.125.44.157]:28572) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ld4xc-0001Om-3G for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 10:49:12 -0500 Received: by yx-out-1718.google.com with SMTP id 34so822249yxf.66 for ; Fri, 27 Feb 2009 07:49:09 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: igrek Cc: emacs-orgmode@gnu.org 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