summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>2012-11-01 13:04:19 +0100
committerBastien Guerry <bzg@altern.org>2012-12-22 16:22:12 +0100
commitce4e0846b2b80430698c88664c505f9171b17204 (patch)
tree03991ff808da77dddbad575813a3f77badd4e893
parent9333426c123b092e76b319a112063602936c2575 (diff)
downloadorg-mode-ce4e0846b2b80430698c88664c505f9171b17204.tar.gz
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.
-rw-r--r--lisp/org.el3
1 files changed, 0 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index a5d48b6..ab1e2ad 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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)