From: igrek <igrekster@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-archive-subtree and heading level
Date: Fri, 27 Feb 2009 16:32:48 +0300 [thread overview]
Message-ID: <go8q1i$81v$1@ger.gmane.org> (raw)
[-- 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
next reply other threads:[~2009-02-27 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 13:32 igrek [this message]
2009-02-27 15:49 ` org-archive-subtree and heading level Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='go8q1i$81v$1@ger.gmane.org' \
--to=igrekster@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).