When pasting a copied subtree, respect the whitelines before and after

* org.el (org-copy-subtree, org-paste-subtree): Fix whitespace
handling when copying/pasting a subtree.
This commit is contained in:
Sebastien Vauban 2012-11-01 13:04:19 +01:00 committed by Bastien Guerry
parent 9333426c12
commit ce4e0846b2
1 changed files with 0 additions and 3 deletions

View File

@ -7674,7 +7674,6 @@ useful if the caller implements cut-and-paste as copy-then-paste-then-cut."
(if (org-called-interactively-p 'any)
(org-back-to-heading nil) ; take what looks like a subtree
(org-back-to-heading t)) ; take what is really there
(org-back-over-empty-lines)
(setq beg (point))
(skip-chars-forward " \t\r\n")
(save-match-data
@ -7684,7 +7683,6 @@ useful if the caller implements cut-and-paste as copy-then-paste-then-cut."
(org-forward-heading-same-level (1- n) t)
(error nil))
(org-end-of-subtree t t))
(org-back-over-empty-lines)
(setq end (point))
(goto-char beg0)
(when (> end beg)
@ -7775,7 +7773,6 @@ the inserted text when done."
(delete-region (point-at-bol) (point)))
;; Paste
(beginning-of-line (if (bolp) 1 2))
(unless for-yank (org-back-over-empty-lines))
(setq beg (point))
(and (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))
(insert-before-markers txt)