|
@@ -7607,6 +7607,7 @@ which is OK for `org-paste-subtree'.
|
|
|
If optional TXT is given, check this string instead of the current kill."
|
|
|
(let* ((kill (or txt (and kill-ring (current-kill 0)) ""))
|
|
|
(re (org-get-limited-outline-regexp))
|
|
|
+ (^re (concat "^" re))
|
|
|
(start-level (and kill
|
|
|
(string-match
|
|
|
(concat "\\`\\([ \t\n\r]*?\n\\)?\\(" re "\\)")
|
|
@@ -7617,7 +7618,7 @@ If optional TXT is given, check this string instead of the current kill."
|
|
|
(progn
|
|
|
nil) ;; does not even start with a heading
|
|
|
(catch 'exit
|
|
|
- (while (setq start (string-match re kill (1+ start)))
|
|
|
+ (while (setq start (string-match ^re kill (1+ start)))
|
|
|
(when (< (- (match-end 0) (match-beginning 0) 1) start-level)
|
|
|
(throw 'exit nil)))
|
|
|
t))))
|