简体   繁体   English

如何在Windows上安装Emacs Prelude

[英]How to install emacs prelude on Windows

I tried following the docs exactly: 我尝试完全按照以下文档操作

git clone git://github.com/bbatsov/prelude.git C:\emacs24.5\prelude
ln -s C:\emacs24.5\prelude C:\Users\blokeley\AppData\Roaming\.emacs.d
cd C:\Users\blokeley\AppData\Roaming\.emacs.d

Then I tried copying C:\\Users\\blokeley\\AppData\\Roaming\\.emacs.d\\prelude\\sample\\prelude-modules.el to various places: 然后,我尝试将C:\\Users\\blokeley\\AppData\\Roaming\\.emacs.d\\prelude\\sample\\prelude-modules.el复制到各个位置:

C:\Users\blokeley\AppData\Roaming\.emacs.d\prelude-modules.el
C:\Users\blokeley\AppData\Roaming\.emacs.d\prelude\prelude-modules.el
C:\Users\blokeley\AppData\Roaming\.emacs.d\prelude\installation\prelude-modules.el
C:\emacs24.5\prelude\prelude-modules.el

When I start emacs, it starts as though prelude was not there: I don't seem to get any indication that prelude has loaded correctly at all. 当我启动emacs时,就好像没有序曲一样开始:我似乎没有任何迹象表明序曲已正确加载。

For example, Mx prelude- returns no matches. 例如, Mx prelude-返回匹配项。 I uncommented the (require 'prelude-helm) but Mx helm- returns no matches. 我未评论(require 'prelude-helm) Mx helm- (require 'prelude-helm)Mx helm-返回任何匹配项。

How do I get prelude working? 如何使前奏奏效?

Just guessing, but if your windows version of emacs does not understand "symbolic links" (those that you create with the ln command) then it wont find your init.el file. 只是猜测,但是如果Windows版本的emacs无法理解“符号链接”(使用ln命令创建的符号链接),则它将找不到您的init.el文件。 Instead of 代替

ln -s C:\emacs24.5\prelude C:\Users\blokeley\AppData\Roaming\.emacs.d

try to copy "C:\\emacs24.5\\prelude" to "C:\\Users\\blokeley\\AppData\\Roaming". 尝试将“ C:\\ emacs24.5 \\ prelude”复制到“ C:\\ Users \\ blokeley \\ AppData \\ Roaming”。

Note that on my machine, the directory ~ expands to C:\\Users\\blokeley\\AppData\\Roaming 请注意,在我的机器上,目录~扩展为C:\\Users\\blokeley\\AppData\\Roaming

I strongly recommend that Windows users set the HOME environment variable to something like C:\\Users\\YOURNAME 强烈建议Windows用户将HOME环境变量设置为C:\\Users\\YOURNAME

I managed to install prelude by: 我设法通过以下方式安装前奏:

git clone git://github.com/bbatsov/prelude.git C:\emacs24.5\prelude
ln -s C:\emacs24.5\prelude C:\Users\blokeley\AppData\Roaming
mv C:\Users\blokeley\AppData\Roaming\prelude C:\Users\blokeley\AppData\Roaming\.emacs.d

Then started emacs, which failed due to no GnuTLS being installed, so I found this issue and followed this help page which fixed it. 然后启动emacs,由于未安装GnuTLS而导致失败,因此我发现了此问题,并按照帮助页面进行了修复。 Basically, I installed GnuTLS from http://sourceforge.net/projects/ezwinports/files/ into my emacs/bin directory and all seems to be working. 基本上,我从http://sourceforge.net/projects/ezwinports/files/安装了GnuTLS到我的emacs/bin目录中,并且似乎一切正常。

I then tried to add my old .emacs file to C:\\Users\\blokeley\\AppData\\Roaming . 然后,我尝试将旧的.emacs文件添加到C:\\Users\\blokeley\\AppData\\Roaming However, this broke prelude completely, so I found that I should simply add my customisations to C:\\Users\\blokeley\\AppData\\Roaming\\.emacs.d\\personal\\custom.el 但是,这完全打破了序幕,所以我发现我应该将自己的自定义添加到C:\\Users\\blokeley\\AppData\\Roaming\\.emacs.d\\personal\\custom.el

I also wanted find and grep to work properly. 我还希望find和grep能够正常工作。 Emacs needs the posix versions of these commands rather than the Windows versions. Emacs需要这些命令的posix版本,而不是Windows版本。 Luckily, I had GitHub Desktop already installed, which has them, so I added the following to my PATH environment variable before system32: 幸运的是,我已经安装了GitHub Desktop ,并且已经安装了它们,因此我在system32之前的PATH环境变量中添加了以下内容:

C:\\Users\\blokeley\\AppData\\Local\\GitHub\\PortableGit_c7e0cbde92ba565cb218a521411d0e854079a28c\\usr\\bin

The long code after PortableGit will be different in your case. 根据您的情况,PortableGit之后的长代码将有所不同。

Happy days. 快乐的时光。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM