emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: how to refile without refiling in order to cache a restricted refile?
Date: Tue, 18 Jun 2013 10:09:14 -0700	[thread overview]
Message-ID: <CAJcAo8uzE5MkGMOQ+=DV5Oq7vMBypW61MtsYP4Az2_kRvP2wbw@mail.gmail.com> (raw)

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.

                 reply	other threads:[~2013-06-18 17:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJcAo8uzE5MkGMOQ+=DV5Oq7vMBypW61MtsYP4Az2_kRvP2wbw@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).