how to install Emacs Prelude system-wide on windows/MinGW?

760 views Asked by At

I am trying to install emacs prelude into emacs. The only thing I found after googling is this page, which tells me to clone prelude into

C:\Users\your_user_name\AppData\Roaming\.emacs.d

But I need to have prelude in the emacs system folder because I need to make my emacs folder a zip file and usable on other machines.

What I tried so far (unsuccessfully) are:

1. Download emacs 24.5.1 from gnu ftp site, and decompress to c:\emacs

2. git clone git://github.com/bbatsov/prelude.git

3. mv prelude/ /c/emacs/site-lisp

I thought step 3 should populate the emacs system-wide startup folder site-lisp, and allow prelude to load on emacs startup. But it didn't happen. I loaded a Haskell .hs file into emacs, and the Haskell mode isn't automatically activated as the prelude documentation suggests.

Can some one please explain how to correctly install prelude into emacs system-wide?

Thanks

1

There are 1 answers

0
Jonathan Jin On

You've "populated" the Emacs site-lisp folder in the sense that you've moved the prelude directory in full to site-lisp. While this would -- in conjunction with require-ing accordingly in your configurations -- be sufficient for "installing" Emacs packages, Prelude is not an Emacs "package" in the strictest sense of that word. Rather, Prelude can be thought of as a pre-defined set of configuration files, and this is why Prelude is generally cloned either directly into .emacs.d or symlinked to from there; it is not a package to require, and therefore does not belong in site-lisp.

The good news is that this makes your goal of making Emacs + Prelude usable on other machines relatively simple to solve with, say, a Bash script that:

  1. Installs emacs in the corresponding manner for the current OS/distro/etc.;
  2. git clone git://github.com/bbatsov/prelude.git path/to/local/repo
  3. ln -s path/to/local/repo ~/.emacs.d
  4. cd ~/.emacs.d

Note that the above is essentially the "manual" installation instructions provided at the Prelude website.

To make Emacs "portable" across different machines, the general consensus seems to be that it's a better idea to write your configurations in a way that allows them to be flexible and easily portable across machines, rather than bundle up a distribution of the Emacs executable itself.