Currently I have two versions of Emacs (system installed by apt-get: emacs26 and my own compiled version emacs27). They both us
emacs.d directory, and I wonder what happens the packages are incompatible with emacs27. May I use a different
.emacs.d" such as.emacs27.d` for only emacs27.
Is it okey to use the same directory for different version of Emacs.
user-emacs-directoryand also the
package-user-dir. When starting Emacs, it is possible to check the Emacs version and programmatically make decisions on which configurations to load. Depending upon the packages (built-in and add-on), there are other variables that may need to be adjusted to control the location that files will be stored. I keep everything in one main directory (with sub-directories) so that I can back-up and synchronize between machines, along with accessing from a virtual machine.
package-user-dirit would make a great answer. I think for Emacs27 one should set
package-user-dirin the early-init.el file.
early-init.elfile. When I changed the
user-emacs-directory, my recollection is that I had to deal with a number of variables that had to be adjusted to make all of my favorite packages store files in my preferred locations. I am not confident that all of the variables rely upon the
user-emacs-directoryas the base; however, it sure would be nice if that were the case. I see an answer to this particular thread as a potential Pandora's Box where the O.P. may have several follow-up questions/problems, and future Google-ers may also need help.