Browse Source

Don't build org-refile-cache if org-refile-use-cache is nil

The function org-get-refile-targets was building org-refile-cache even
if org-refile-use-cache was set to nil. This caused every refile
attempt to call org-refile-cache-clear and to produce the message
"Refile cache has been cleared."
Matt Lundin 15 years ago
parent
commit
4c6012f831
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -9661,7 +9661,8 @@ on the system \"/user@host:\"."
 		     (when (= (point) pos0)
 		       ;; verification function has not moved point
 		       (goto-char (point-at-eol))))))))
-	    (org-refile-cache-put tgs (buffer-file-name) descre)
+	    (when org-refile-use-cache
+	      (org-refile-cache-put tgs (buffer-file-name) descre))
 	    (setq targets (append tgs targets))
 	    ))))
     (message "Getting targets...done")