From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: how to refile without refiling in order to cache a restricted refile? Date: Tue, 18 Jun 2013 10:09:14 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UozPA-0008Mz-OH for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 13:09:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UozP9-00050A-J8 for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 13:09:16 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:58029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UozP9-0004zr-CO for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 13:09:15 -0400 Received: by mail-wg0-f53.google.com with SMTP id y10so3716266wgg.20 for ; Tue, 18 Jun 2013 10:09:14 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I use the refile cache, but there is one operation that is not performed by the caching. The first call to refile after rebuilding the cache takes seconds to run. Subsequent calls are much faster. How can I do a refile without refiling in the following defun? (defun hoka-org-refile-rebuild-cache () (org-refile-cache-clear) (org-refile-get-targets)) What I want is to know what to do after the last form in that defun. The slowdown seems to occur when the first refile is not the full set of headlines. I do that like this: (defun hoka-org-refile-restricted () (interactive) (let ((org-refile-targets alpha-org-refile-targets-restricted)) (call-interactively 'org-refile))) Thanks. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it.