I just upgraded GNU Emacs from 23 to 24 on MacOS and some ELPA installed packages stopped working. One of them is AucTeX. Deleting it and reinstalling it through the package manager made it work again, but I don't want to do this by hand for every package. I'm slightly confused that I find nothing about that on the Internet.
Don't the .elc need to be recompiled for a new version of Emacs? Why isn't this a feature of package.el?
Updating PackagesAfter running package-list-packages , type U (mark Upgradable packages) and then x (eXecute the installs and deletions). When it's done installing all the packages it will ask if you want to delete the obsolete packages and so you can hit y (Yes).
Once installed, the contents of a package are placed in a subdirectory of ~/. emacs. d/elpa/ (you can change the name of that directory by changing the variable package-user-dir ). The package subdirectory is named name - version , where name is the package name and version is its version string.
Once you find the installed version of the package, press D to mark the package for deletion; if this fails, press d . You should see a D mark in the left before the package name. Press x to execute the action and actually delete the package.
You do not need to re-install all packages. The packages itself are likely fine, however, they need to be re-compiled, because Emacs Lisp byte code is generally not compatible across major versions.
To re-compile all packages, type M-: (byte-recompile-directory package-user-dir nil 'force)
. After restarting Emacs, packages should work fine again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With