Org-refile-cache fails when org-refile-use-outline-path is set to file. Specifically, org-refile-cache-check-set throws a markerp error when it encounters file targets, since they have nil instead a marker object. This patch applies the test only to targets with markers (i.e., headings). --- lisp/org.el | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el index 496eceb..38e6a30 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9537,13 +9537,16 @@ on the system \"/u...@host:\"." (defun org-refile-cache-check-set (set) "Check if all the markers in the cache still have live buffers." + (let (marker) (catch 'exit - (while set - (if (not (marker-buffer (nth 3 (pop set)))) - (progn - (message "not found") (sit-for 3) - (throw 'exit nil)))) - t)) + (while (setq marker (nth 3 (pop set))) + ;; if org-refile-use-outline-path is 'file, marker may be nil + (when marker + (if (not (marker-buffer marker)) + (progn + (message "not found") (sit-for 3) + (throw 'exit nil))))) + t))) (defun org-refile-cache-put (set &rest identifiers) "Push the refile targets SET into the cache, under IDENTIFIERS." -- 1.7.1 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode