unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "yinglcs@gmail.com" <yinglcs@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: setting up filecache and ido
Date: Sun, 2 Nov 2008 23:12:07 -0800 (PST)	[thread overview]
Message-ID: <5915a45f-a1f3-4a2d-8489-d17f317eff9f@c22g2000prc.googlegroups.com> (raw)

Hi,

I am trying to following this:
http://sachachua.com/wp/2008/07/27/eclipse-to-emacs-navigating-your-source-tree/#comment-103149

to setup my emacs with etag.

But when I include the following in my emacs.
emacs goes up to 100% cpu for > 5 minutes.  Can you please tell me how
can I fix my problem?

Thank you.

(require 'filecache)
(require 'ido)
(defun file-cache-ido-find-file (file)
  "Using ido, interactively open file from file cache'.
First select a file, matched using ido-switch-buffer against the
contents
in `file-cache-alist'. If the file exist in more than one
directory, select directory. Lastly the file is opened."
  (interactive (list (file-cache-ido-read "File: "
                                          (mapcar
                                           (lambda (x)
                                             (car x))
                                           file-cache-alist))))
  (let* ((record (assoc file file-cache-alist)))
    (find-file
     (expand-file-name
      file
      (if (= (length record) 2)
          (car (cdr record))
        (file-cache-ido-read
         (format "Find %s in dir: " file) (cdr record)))))))

(defun file-cache-ido-read (prompt choices)
  (let ((ido-make-buffer-list-hook
	 (lambda ()
	   (setq ido-temp-list choices))))
    (ido-read-buffer prompt)))

(ido-mode t)
;; Change this to filter out your version control files
(add-to-list 'file-cache-filter-regexps "\\.svn-base$")
(if drupal-project-path
    (file-cache-add-directory-using-find drupal-project-path))

(global-set-key (kbd "ESC ESC f") 'file-cache-ido-find-file)


             reply	other threads:[~2008-11-03  7:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03  7:12 yinglcs [this message]
2008-11-03 23:25 ` setting up filecache and ido Xavier Maillard

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5915a45f-a1f3-4a2d-8489-d17f317eff9f@c22g2000prc.googlegroups.com \
    --to=yinglcs@gmail.com \
    --cc=help-gnu-emacs@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.
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).