Browse Source

org.el: Fix bug in `org-refile'.

* org.el (org-refile): Fix bug: prevent looping when calling
`org-set-tags' internally.
Bastien Guerry 13 years ago
parent
commit
620737757f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -10839,7 +10839,9 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 				       org-log-refile)
 				       org-log-refile)
 		    (unless (eq org-log-refile 'note)
 		    (unless (eq org-log-refile 'note)
 		      (save-excursion (org-add-log-note))))
 		      (save-excursion (org-add-log-note))))
-		  (and org-auto-align-tags (org-set-tags nil t))
+		  (and org-auto-align-tags
+		       (let ((org-loop-over-headlines-in-active-region nil))
+			 (org-set-tags nil t)))
 		  (bookmark-set "org-refile-last-stored")
 		  (bookmark-set "org-refile-last-stored")
 		  ;; If we are refiling for capture, make sure that the
 		  ;; If we are refiling for capture, make sure that the
 		  ;; last-capture pointers point here
 		  ;; last-capture pointers point here