Don't eat headline when yank with point at existing headline

* org.el (org-paste-subtree): Don't eat headline when called with
point at existing headline.
This commit is contained in:
David Maus 2011-08-10 18:38:26 +02:00
parent 14b556772b
commit ece3091f16

View file

@ -7530,8 +7530,8 @@ the inserted text when done."
(force-level (cond (level (prefix-numeric-value level))
((and (looking-at "[ \t]*$")
(string-match
^re_ (buffer-substring
(point-at-bol) (point))))
"^\\*+$" (buffer-substring
(point-at-bol) (point))))
(- (match-end 1) (match-beginning 1)))
((and (bolp)
(looking-at org-outline-regexp))
@ -7568,7 +7568,7 @@ the inserted text when done."
(if force-level
(delete-region (point-at-bol) (point)))
;; Paste
(beginning-of-line 1)
(beginning-of-line (if (org-at-heading-p) 2 1))
(unless for-yank (org-back-over-empty-lines))
(setq beg (point))
(and (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt))