emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-archive-subtree and heading level
@ 2009-02-27 13:32 igrek
  2009-02-27 15:49 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: igrek @ 2009-02-27 13:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

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.



[-- Attachment #2: org-archive-subtree.patch --]
[-- Type: text/plain, Size: 475 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: org-archive-subtree and heading level
  2009-02-27 13:32 org-archive-subtree and heading level igrek
@ 2009-02-27 15:49 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-02-27 15:49 UTC (permalink / raw)
  To: igrek; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-27 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 13:32 org-archive-subtree and heading level igrek
2009-02-27 15:49 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).