From mboxrd@z Thu Jan 1 00:00:00 1970 From: igrek Subject: org-archive-subtree and heading level Date: Fri, 27 Feb 2009 16:32:48 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020808010908020709070404" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ld2rx-0005PQ-5X for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 08:35:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ld2rs-0005OT-Cf for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 08:35:10 -0500 Received: from [199.232.76.173] (port=38708 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ld2rq-0005Ny-37 for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 08:35:06 -0500 Received: from main.gmane.org ([80.91.229.2]:46830 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ld2rp-0003mN-Dg for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 08:35:05 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Ld2rn-0001Rz-40 for emacs-orgmode@gnu.org; Fri, 27 Feb 2009 13:35:03 +0000 Received: from 89.112.26.226.pppoe.eltel.net ([89.112.26.226]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Feb 2009 13:35:03 +0000 Received: from igrekster by 89.112.26.226.pppoe.eltel.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 Feb 2009 13:35:03 +0000 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: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------020808010908020709070404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------020808010908020709070404 Content-Type: text/plain; name="org-archive-subtree.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="org-archive-subtree.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 --------------020808010908020709070404 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --------------020808010908020709070404--