mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
Fix archiving bug introduced by last commit
* lisp/org.el (org-kill-is-subtree-p): matched string needs to start at bol.
This commit is contained in:
parent
5b39df0523
commit
4fd9989b58
@ -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))))
|
||||
|
Loading…
Reference in New Issue
Block a user