
- #Emacs projectile update#
- #Emacs projectile driver#
- #Emacs projectile manual#
- #Emacs projectile portable#

helm-projectile, projectile-rails, consult-projectile).

#Emacs projectile portable#
find, grep, etc), I decided toīuild a tool that’s truly portable and won’t rely on any external commands. Shelled out to Unix command-line tools (e.g. Packages that deal with project interaction assumed an Unix-like environment and Using Windows was an option, but not using Emacs was not an option.
#Emacs projectile driver#
I had some Linux driver issues with my brand new ThinkPad, whichįorced me to temporarily work on Windows and the rest is history.

I still remember the humble beginnings of the project, which started out simplyīecause I was frustrated that the venerable find-file-in-project didn’t work Project interaction library for Emacs) had turned 10 years old. So if someone in your team adds a new file to the project and (assuming you are using git to version control) you use your special aliased git pull, the cache will be invalidated automatically when you do projectile-find-file the next time.I just realized this morning that on the 31st of July 2021, my very first For example, you can alias the git commit, git pull, etc to do touch /your/projectile/project/root/.projectile`Īfter doing whatever you were doing with the git commands.
#Emacs projectile update#
projectile file when you update the project. From projectile.el source - lines 575-579 (when (or force (file-newer-than-file-p (projectile-dirconfig-file) "Invalidate if FORCE or project's dirconfig newer than cache." (defun projectile-maybe-invalidate-cache (force) This check is done whenever you try to find any file in the project using projectile projectile-find-file or C-c p f if one of the commands that does this check first. Projectile automatically invalidates the cache if the /your/projectile/project/root/.projectile file is newer than the project cache file.
#Emacs projectile manual#
This does not speed up the file caching but it saves the manual step of having to invalidate the stale cache (which does not contain the new file). It's possible you could override this with dir-locals or the like to force a faster lookup method. They specify where projectile looks for the list of files. Otherwise you might want to chase down the rabbit hole of projectile-get-repo-files and projectile-get-ext-command. If you are on linux the alien method is enabled by default though.

Otherwise it uses an 'alien method, ie git ls, find, etc. By default projectile-indexing-method is set to 'native on windows, which prefers an elisp implementation of find as it is more portable. For this it would help if there was a little more information about your environment. However, it sounds like the real issue is it takes too long to rebuild the cache by traversing the tree. That will be the fastest solution without invalidating the existing cache. The suggestion in the comment about using projectile-cache-current-file is technically correct, but there is a hook on find-file that automatically calls this on every new file that is opened. Use the prefix argument, ie C-u C-c p f to quickly invalidate and find files in project.
