From: gregory@dynapse.com (Gregory J. Grubbs)
To: emacs-orgmode@gnu.org
Subject: Problem refiling using IDO with flex matching
Date: Sat, 14 Nov 2009 09:51:26 -0700 [thread overview]
Message-ID: <87my2pyrqp.fsf@dynapse.com> (raw)
Hi, all.
I find that using IDO with fuzzy matching turned on is making org-refile
unusable. The problem is that emacs will lock up for up to 45 seconds
for each character I type, as ido searches through 3 levels of headings
in all my archive files. I like having ido turned on for this, as it
allows me to type a word that is unique to a 3rd-level heading, and jump
right to that without having to find it hierarchically. But I can live
without flex matching for this purpose.
There is no hook run at the beginning of org-refile, so I have tried
using defadvice to turn off flex matching. For some reason, it isn't
working for me:
--8<---------------cut here---------------start------------->8---
(defadvice org-refile-pseudo-hook (before org-refile)
"do some customizations prior to running org-refile"
(setq ido-enable-flex-matching nil))
(ad-activate 'org-refile-pseudo-hook)
--8<---------------cut here---------------end--------------->8---
I've tried doing the above as "around" advice as well as "before"
advice. In either case, flex matching is still turned on when I invoke
org-refile.
I suppose an alternative would be to add a hook variable to be run near
the beginning of org-refile. But I would still love to be enlightened
about the correct use of defadvice!
FWIW, here are what I think are my relevant variable settings (the
verify function could be suspected of slowing things down, but selection
is very fast with ido flex matching off):
--8<---------------cut here---------------start------------->8---
(ido-everywhere 1)
(setq ido-enable-flex-matching t)
(setq org-goto-interface 'outline-path-completion)
(setq org-outline-path-complete-in-steps nil)
(setq org-refile-targets '((org-agenda-files :maxlevel . 3))
org-refile-use-outline-path 'file
org-refile-target-verify-function
(lambda ()
(not (member "ARCHIVE" (org-get-tags)))))
--8<---------------cut here---------------end--------------->8---
next reply other threads:[~2009-11-14 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 16:51 Gregory J. Grubbs [this message]
2009-11-14 18:20 ` Problem refiling using IDO with flex matching Gregory J. Grubbs
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=87my2pyrqp.fsf@dynapse.com \
--to=gregory@dynapse.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).