Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fiplr-find-file in home freezes emacs for an undefined amount of time. #61

Open
krux02 opened this issue Apr 2, 2016 · 2 comments
Open

Comments

@krux02
Copy link

krux02 commented Apr 2, 2016

I executed fiplr-find-file from my home directory, and I got the message "scanning... (/home/arne/)", but since then, nothing has happened, it just freezes, and I have one processor on 100% since then. I have to admit my home directory is not tiny, there are quite some projects, but CtrlP in vim only needs a few seconds to build the index.

With this problem, binding C-x C-f becomes a very bad idea, becaues it means that the key combination can't be used anymore if emacs is started from another directory.

Here some timings just to show that this is in fact a possible problem:

~/ time find . > /dev/null
find . > /dev/null  0,25s user 0,37s system 98% cpu 0,636 total
time ag arne > /dev/null 
ag arne > /dev/null  13,93s user 5,41s system 63% cpu 30,269 total

I pipe the output to /dev/null, because otherwise printing the output becomes the bottleneck, and that's not what I want to measure. Ag is a search program (silver searcher) that does not use an index, it searches directly, but smart, and it actually process the file content. It is just here to give an upper limit, on how long the creation of an index should take.

@meain
Copy link

meain commented Jun 2, 2017

Use this, its not the best method, but good enough. If it is a git directory it will use fiplr-find-file otherwise helm-recentf

(defun recent-selector-open ()
  "Switch between helm and fiplr based on directory."
  (interactive)
  (if (string= (shell-command-to-string (concat "git -C " default-directory " rev-parse")) "") (fiplr-find-file) (helm-recentf)))

@krux02
Copy link
Author

krux02 commented Jun 2, 2017

I am not using fiplr-find-file anymore. I use projectile-find-file. This allows me to have one plugin less.

(global-set-key (kbd "s-f") 'projectile-find-file)
(global-set-key (kbd "s-s") 'helm-do-grep-ag)
(global-set-key (kbd "s-S") 'helm-grep-do-git-grep)  ;; I have one project where ag has an incompatible ignore list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants