I am using different versions of emacs, on different computers. On some of those (work computers) I don't really have a choice to update, whereas for my personal computers, I like to run the latest stable release.
I carry a customization "package" around, with init files and third-party packages, downloaded either separately or with the package manager.
Usually it works fine, but from time to time, after installing a new package on one of the devices, I will run into errors with the others.
It may happen that the package is simply not compatible with the older version of emacs (in which case I have no choice but to use
package-load-list to exclude those packages), but more frequently the package is compatible, but its compiled version isn't.
A work-around is to recompile the package on the older emacs, but this is a hassle, and I'm always worried that I will lose on performances (the machines running older emacses are typically faster than my personal computer).
Hence my question: is there a way to have emacs automatically manage this, for example by indicating with each compiled file the version for which it was compiled, and recompiling if no compatible version is found?
Or, at least, is there a way to tell emacs to always compile packages for some specified older version of emacs?