In Windows it is easy: you need to set two distinct
$HOME folders to host the packages.
For OSX the process should be as follows.
After installing Emacs 24 and 25, in distinct folders, create two folders:
Create two scripts,
Adjust the folder paths as needed.
Now, when you run
run24, you start the Emacs 24 binary, which will use
path/to/home24/.emacs.d for storing packages; while
run25 will use
Can you keep/share the same init file and configuration folders?
There is no straight answer to this question.
Since there are tons of open source packages, the Emacs developers do not introduce changes in new releases that break the previous ones, but they instead use deprecation.
That is, Emacs just warns you, but still lets you use the deprecated commands. For example, sharing the
polymode package (from Emacs 24), I got:
share/emacs/site-lisp/polymode/polymode-classes.el: ‘defmethod’ is an obsolete macro (as of 25.1); use ‘cl-defmethod’ instead.
share/emacs/site-lisp/polymode/polymode-classes.el: ‘defgeneric’ is an obsolete macro (as of 25.1); use ‘cl-defgeneric’ instead.
which are in fact just warnings.
This is the theory. In my practice, after upgrading, Emacs occasionally failed to start or some packages failed to work an I had to fix my init file and/or upgrade some packages to have the whole system working.
Your mileage may vary as actual results depends on how complex is your init file, how often do you maintain it, how many packages do you have and how supported they are.