Bladeren bron

Fix archiving bug introduced by last commit

* lisp/org.el (org-kill-is-subtree-p): matched string needs to start
  at bol.
Nicolas Goaziou 14 jaren geleden
bovenliggende
commit
4fd9989b58
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

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