[O] Re: [Orgmode] Refile cache expire

2011-03-05 Thread Bastien
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



[Orgmode] Refile cache expire

2011-02-26 Thread Tom
Caching of refile targets is great, however, I usually have my 
computer and emacs running for several days (I use hibernation),
so sometimes I need to clear the cache manually to have it rebuilt.

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

For example, I could set the cache to expire after and hour (or a day,
etc.) and then it would be cleared and rebuilt automatically, but only
when the computer is idle for, say, 5 seconds. This way one could have
a pretty up-to-date refile cache all the time and the rebuilding
would happen when emacs is idle, so the use wouldn't even have to
notice the updating process.



___
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