ajitid · 2022-02-02 18:11
I usually switch git branches a lot and have found `projectile-find-file` or `SPC SPC` list getting outdated quickly. That's why I had to do `(setq projectile-enable-caching nil)`. Have you guys applied any caching setting with which you can keep projectile caching while also ensuring that find file list remains up to date?
Not sure if it would help, but I'm using doom emacs.
TheFrenchPoulp · 2022-02-02 20:22
Back when I used `projectile` I used `f` to find files and `F` to force-refresh the cache beforehand. Here is the commit where I moved to `project.el` instead. Highlights are the 2 aforementioned commands
https://github.com/angrybacon/dotemacs/commit/50cbd642fc469821e456d689c04a9cb5452171bf#diff-1e5a77f1f8ddf71bf538750c0527b172c4c0d9491bc77fd534dcb4de7b4b07a0L1467-L1468
luknax · 2022-02-02 22:16
My approach is advicing magit-checkout to invalidate projectile cache, so that I can take avantage of the cache as long as working on the same branch, just slowing down the very first find-file after moving to another branch.
ajitid · 2022-02-03 00:29
Not sure why it’s not present, but I did mention in a comment that I’m not using magit.
Just in case if others came across this post and want the solution with magit: https://emacs.stackexchange.com/a/26272
ajitid · 2022-02-03 01:08
I’m not using Magit, so could something equivalent to inotify would help? Maybe to make it efficient, only use a file watcher on `.git/HEAD`, otherwise just leverage projectile’s default caching? (Not sure if it would work properly with stashes though)
Walheimat · 2022-02-05 09:24
Is `project.el` in a place now that it can completely replace `projectile`? Anything you're missing?
TheFrenchPoulp · 2022-02-05 12:45
I think it can, unless you rely on ignoring specific path files through `.projectile`.
That being said, I found that `project-kill-buffers` wasn't as Eglot-friendly as the Projectile counterpart (it complains about still running processes) but I haven't taken the time to investigate.
Other than that I'm also missing `projectile-save-project-buffers` but that should be trivial to implement. For now though I'm lazy and open the Magit status buffer which prompts me to save all buffers anyway.