0

I am using different Emacs starter kits. The problem is that each starter kit, I use different directories (for example, for prelude I use´.emacsPrelude.d´, for SciMax I use ´.emacsSciMax.d´) . But all starter kits shares a common directory inside the directories, which is called Elpa. I can't use the same directory because each has different directory structure. Is there any Emacs command to define where Elpa packages will be installed? Or can I change the Elpa directory in my ´init.el´ file?

4
  • How about using a different package-user-dir for different setups. When Emacs starts, it can ask you which starter kit / setup you want to use and then assign the corresponding package-user-dir. You can take it one step further and even have different user-emacs-directory ... assigning the value on startup.
    – lawlist
    Jul 9, 2019 at 22:59
  • @lawlist, I found a similar question on here. It looks ´package-user-dir´ right way to proceed. Could you elaborate a little bit about ´user-emacs-directory´. And how can I arrange my ´init´ file that Emacs ask me whict starter kit/ setup I want to use and then assign the corresponding ´package-user-dir´.
    – ofenerci
    Jul 9, 2019 at 23:19
  • Here is a link to an example of what I had in mind in terms of Emacs asking the user which settings to load and adjusting the package-user-dir accordingly: github.com/lawlist/countdown-timer Changing the user-emacs-directory is something I do programmatically when using different computers and different operating systems ... because the paths will be different.
    – lawlist
    Jul 10, 2019 at 1:33
  • I like all of my stuff to be in one main folder so that I can easily backup and synchronize with other computers and handheld devices. My main directory with all the stuff is /Users/HOME/.0.data and my Emacs installation and related Emacs-stuff is /Users/HOME/.0.data/.0.emacs. I set the user-emacs-directory to /Users/HOME/.0.data/.0.emacs/ -- ensuring that it has a forward trailing slash . My w32 virtual machine (Parallels) has an Emacs installation and I set the user-emacs-directory as y:/.0.data/.0.emacs/, which is a mapped to the host computer where I have all my Emacs-stuff.
    – lawlist
    Jul 10, 2019 at 14:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.