Archive: Fix bug when archiving to top-level

Org erroneously filed top-level headings as level 2, because it
assumes that if should file below some heading.  However, if there is
no heading to file under, this should be turned off.

Patch by igrekster.
This commit is contained in:
Carsten Dominik 2009-02-27 16:48:43 +01:00
parent 87b815ddc4
commit 7c92da7ba8
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-02-27 Carsten Dominik <carsten.dominik@gmail.com>
* org-archive.el (org-archive-subtree): Do not add 1 to level if
pasting at top level.
* org-bbdb.el: Improve documentation.
2009-02-26 Carsten Dominik <carsten.dominik@gmail.com>

View File

@ -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