瀏覽代碼

No need to call org-back-to-heading with goto argument.

* lisp/org.el: (org-refile) Don't call org-back-to-heading with goto
  argument.

This fixes an error that results when calling org-refile with the
GOTO argument in a non-org buffer.
Matt Lundin 13 年之前
父節點
當前提交
8478a5541c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -10487,7 +10487,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
 		      (setq goto nil)))
 		      (setq goto nil)))
 	       (setq it (or rfloc
 	       (setq it (or rfloc
 			    (save-excursion
 			    (save-excursion
-			      (org-back-to-heading t)
+			      (unless goto (org-back-to-heading t))
 			      (org-refile-get-location
 			      (org-refile-get-location
 			       (cond (goto "Goto")
 			       (cond (goto "Goto")
 				     (regionp "Refile region to")
 				     (regionp "Refile region to")