0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 09:16:27 +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:
Nicolas Goaziou 2011-07-21 16:53:50 +02:00
parent 5b39df0523
commit 4fd9989b58

View file

@ -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))))