emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Re: [Orgmode] Refile cache expire


From: Bastien
Subject: [O] Re: [Orgmode] Refile cache expire
Date: Sun, 06 Mar 2011 01:26:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Tom,

Tom <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]