emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how to refile without refiling in order to cache a restricted refile?
@ 2013-06-18 17:09 Samuel Wales
  0 siblings, 0 replies; only message in thread
From: Samuel Wales @ 2013-06-18 17:09 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-18 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 17:09 how to refile without refiling in order to cache a restricted refile? Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).