7

I have two projects opened in my Emacs. Both are git repos and have .projectile files in their directories.

Relevant lines in my init.el

(projectile-global-mode 1)
(helm-mode)
(setq projectile-completion-system 'helm)
(helm-projectile-on)

Problem:
projectile-switch-project (C-c p p) only shows a list containing the project related to current buffer. If I switch buffer to a file from the second project, the list contains just the second project. If I switch to a buffer not related to any project the list is empty.

When I disable Helm, then running C-c p p results in "There are no known projects" info in the minibuffer. Which is strange, because I see Projectile[projectdirname] in the modeline and for example C-c p f runs projectile-find-project-file as expected and lists the files from the current project.

I've tried projectile-invalidate-cache and projectile-cleanup-known-projects without success. Is there a trick (or an obvious step I have overlooked) to make projectile aware of opened projects?

platform: Windows7, Emacs version: GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) and GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601), Projectile 20150108.957 from Elpa.

6
  • 1
    Disregard my previous comments, projectile-enable-caching t is already the default on Windows. Maybe check your ~/.emacs.d/projectile.cache file to see if your projects are there and caching correctly.
    – nanny
    Jan 22, 2015 at 14:44
  • I can reproduce the bug now. If you use Dired to navigate and go back, you will lose your project name in the list as soon as you move outside of that project with Dired. Until when you actually open a file in that project, the project won't be added to project list. It is because projectile-cache-files-find-file-hook is only added to find-file-hook and projectile-find-dir hook.
    – Tu Do
    Jan 22, 2015 at 14:59
  • I haven't used Dired, projectile.cache seems to look fine, but I've found a projectile-bookmarks.eld file in ~/.emacs.d/ and there was just a single entry. I've added paths to both of my projects there and I can switch between them using C-c p p (still doesn't work every time, but it's a progress).
    – pawel
    Jan 22, 2015 at 15:47
  • Any updates here? I've just started to use helm-projectile, and I see the same behaviour. I don't have a projectile-bookmards.eld file, otherwise it seems to be the identical issue. Mar 17, 2015 at 10:22
  • Seems my problems was related to helm-buffers-match-function not being defined. I aliased it to belm-buffers-list--match-fn and then it works. Something is buggy though... Mar 17, 2015 at 11:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.