如何在Windows / MinGW上安装Emacs Prelude系统?

时间:2015-06-10 16:39:11

标签: emacs emacs-prelude

我正在尝试将emacs prelude安装到emacs中。我在google搜索后找到的唯一内容是this page,它告诉我将前奏克隆到

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

但我需要在emacs系统文件夹中有前奏,因为我需要将我的emacs文件夹设为zip文件并可在其他计算机上使用。

到目前为止我尝试过的(失败的)是:

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

我认为第3步应该填充emacs系统范围的启动文件夹site-lisp,并允许在emacs启动时加载序言。但它并没有发生。我将一个Haskell .hs文件加载到emacs中,并且Haskell模式不会像前言文档所示自动激活。

有人可以解释如何在系统范围内正确安装prelude到emacs中吗?

由于

1 个答案:

答案 0 :(得分:1)

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.