From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Refile cache expire Date: Sun, 06 Mar 2011 01:26:48 +0100 Message-ID: <87pqq5f60n.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=34910 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pw1oL-000615-N8 for emacs-orgmode@gnu.org; Sat, 05 Mar 2011 19:27:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pw1oK-00084w-Ja for emacs-orgmode@gnu.org; Sat, 05 Mar 2011 19:27:01 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:37259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pw1oK-00084o-8i for emacs-orgmode@gnu.org; Sat, 05 Mar 2011 19:27:00 -0500 Received: by wwb29 with SMTP id 29so1293080wwb.0 for ; Sat, 05 Mar 2011 16:26:59 -0800 (PST) In-Reply-To: (Tom's message of "Sun, 27 Feb 2011 07:34:40 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tom Cc: emacs-orgmode@gnu.org Hi Tom, Tom 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