After packages have been updated, the location of the loaded elisp files will change to be in the folder of the new version of the package.
Yasnippet attempts to lazily load snippets for the file it was installed it, when I open a file in a major mode yasnippet hasn't seen before.
This means that loading things with previously unseen major modes once emacs has been updated fails, because yasnippet breaks the whole thing by complaining about "no such file or directory".
Is there a good general way to solve this, such as not letting updates break things? (I get a similar but less tedious problem when ag is updated). Alternatively, would advising something in yasnippet to just swallow the errors so it merely warns instead of erroring when it couldn't load packages be a better plan?
Clarification:
- I start emacs, and yasnippet is loaded.
- I load no files whose major mode is (for example) makefiles.
- I update to a new version of yasnippet, using the package manager
- I load a makefile, and yasnippet attempts to load the snippets for makefiles but it fails, because the folder it was using for snippets no longer exists. Not only that, but practically every other command fails, because the pre-hook to them that yasnippet installed fails.
- Workaround: Open the message buffer, find which folder cannot be opened and run
mkdir ~/.blargh/folder-yasnippet-wants
.
Clearly, one could could write some advice for some bit of yasnippet, but I'm hoping for a more global solution (and it'd take a while of playing with elisp to get the advice to work I'm sure).