Using Spacemacs with different Emacs versions

Update on [2016-10-11 Tue]: thanks to bmag Spacemacs has an option to set packages directory based on Emacs version. Just set dotspacemacs-elpa-subdirectory to emacs-version and be happy about it. This option is available starting with Spacemacs v0.200.

Emacs 25 is very stable at the moment and I am using it for more than 6 months with Spacemacs. There are some open issues related to Emacs 25, but still it’s very good and I recommend to use it on a daily basis.

Sometimes I need to switch to older version of Emacs. Usually it means that I have to totally nuke ~/.emacs.d/elpa directory and wait for several minutes in order to install 300+ packages. This is not critical, but there is room for improvement. Thanks to bmag now it is possible to easily (without any dirty hacks) to change directory where all packages are installed. I use separate directories for every Emacs version. So packages are downloaded only the first time I use specific version. But for the next time everything will be ready for use.

;; setup package-user-dir to allow seamless switch between emacs versions
(setq package-user-dir (file-name-as-directory
                        (concat user-emacs-directory "elpa/" emacs-version)))

Add this expression to dotspacemacs/user-init function in your .spacemacs and make it easier to switch between versions.

Posted on June 24, 2016 by Boris Buliga

Source: Using Spacemacs with different Emacs versions