Hi Tom,

Tom <adatgyu...@gmail.com> writes:

> How about adding an option to set an expiration time for the refile
> cache after which it is cleared automatically and rebuilt again?

How about using something like this in your .emacs.el:

#+begin_src emacs-lisp
  (setq org-refile-rebuild-cache
    (run-with-idle-timer 600 t
     (lambda ()
      (org-refile-cache-clear)
      (org-refile-get-targets))))
#+end_src

Then you can cancel it with

#+begin_src emacs-lisp
  (cancel-timer org-refile-rebuild-cache)
#+end_src

HTH,

--
 Bastien

Reply via email to