【问题标题】:How to install the slime into emacs under Windows7windows7下如何将slime安装到emacs中
【发布时间】:2012-07-10 11:14:39
【问题描述】:

Win7下如何将slime安装到emacs中?

我下载了一个带有“.tgz”的压缩包。但它似乎适用于linux。但是对于windows(win 32 OS)真的没有一回事。

我打开这个包裹,发现里面有很多文件。

【问题讨论】:

    标签: emacs lisp slime


    【解决方案1】:

    据我所知,它实际上是the same as for other operating systems。 (至少,它在 FreeBSD/ArchLinux/Win7 下一直对我有用。)首先,您解压到您喜欢的位置,然后将类似这样的内容添加到您的 .emacs 中(假设您在用户目录下的某个位置解压):

    (add-to-list 'load-path "~/my/path/to/slime/")
    ;; (add-to-list 'load-path "~/my/path/to/slime/contrib/") ; for optional features
    
    (slime-setup
    ;; '(slime-fancy slime-asdf slime-references              ; optional features
    ;;   slime-indentation slime-xref-browser)
    )
    
    (setq slime-lisp-implementations
          '((ccl ("~/path/to/ccl/wx86cl"))
            (clisp ("~/path/to/clisp-2.49/clisp" "-modern"))) ; giving a command arg
          slime-default-lisp 'ccl)
    

    重新启动 Emacs 或在每个顶级表单后面键入 C-x C-e。然后,键入M-x slime RET(或C-u M-x slime RET,如果您想在slime-lisp-implementations 中的实现之间进行选择,否则将使用slime-lisp-default)它应该可以正常工作(它对我有用)。 slime-lisp-implementations 的设置是可选的——你也可以在启动 Slime 时手动提供 lisp 实现的路径。

    假设你想在 CL 中使用 Slime,因为没有 Clojure 标签。如果您想将它与 Clojure 一起使用,不幸的是,情况有些不同,并且两个版本不能很好地配合使用。上次我检查时,推荐的与 Clojure 一起使用的方法是使用 Emacs 24 的包系统进行安装,或者,如果您使用的是旧版本,则使用 E​​LPA(基本相同)。

    【讨论】:

    • 非常感谢您。什么是'ccl'?需要下载吗?
    • 在上面的示例配置中,符号cclclisp 是Common Lisp 实现的名称,路径指向的程序。它们是编译和运行 Lisp 代码所必需的。 ccl 用于 Clozure Common Lisp (ccl.clozure.com),clisp 用于 CLISP (clisp.org)。 Slime 本身只是一个基于 Emacs 的开发环境,而不是 Lisp 实现。所以,是的,你需要至少下载一个 Lisp 实现,或者在启动 slime 时提供可执行文件的路径,或者如上所述在slime-lisp-implementations 中预先配置它们。
    【解决方案2】:

    这对我有用,

    • 通过git clone 或通过下载zip 从https://github.com/slime/slime 获取Slime 副本。解压并保存在D:/myuser/slime-2.13,例如
    • 下载安装CLISP
    • 将此添加到.emacs 文件中,通常位于C:/users/myuser/AppData/Roaming

      ; This is the path where you've saved Slime in the first step
      (add-to-list 'load-path "D:/myuser/slime-2.13/")
      (require 'slime-autoloads)
      ; This is the path where CLISP was installed. 
      ; Use Progra~1 for "Program Files" and Progra~2 for "Program Files (x86)"
      (setq inferior-lisp-program "/C/Progra~2/clisp-2.49/clisp.exe")
      

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-02
      • 2012-09-18
      • 2013-04-02
      • 2012-03-17
      • 2015-07-19
      相关资源
      最近更新 更多