Emacs(Cocoa Emacs)与Aquamacs在Mac OS X上运行Clojure [英] Emacs (Cocoa Emacs) vs Aquamacs for running Clojure on Mac OS X

查看:253
本文介绍了Emacs(Cocoa Emacs)与Aquamacs在Mac OS X上运行Clojure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我使用了 Aquamacs ,我需要安装并运行 Clojure ,使用 SLIME 。我已经去了一些方法来使用Clojure在SLIME的Aquamacs,但没有成功。

I used Aquamacs so far, and I need to install and run Clojure using SLIME. I googled to get some way to use Clojure on SLIME of Aquamacs, but without success.


  1. 可以在Aquamacs上安装Clojure吗?或者,你能猜测为什么Clojure在Aquamacs上不起作用?

  2. Emacs和Aquamacs不能共享相同的 ELPA

  3. 是否可以使用ELPA在Emacs / Aquamacs上安装Conjure?

  4. 我被告知可以使用'lein swank'作为服务器运行,你知道怎么做吗?
  1. Is it possible to install Clojure on Aquamacs? Or, can you guess why Clojure on Aquamacs doesn't work?
  2. Is it normal that Emacs and Aquamacs can't share the same ELPA?
  3. Is it possible to use ELPA to install Conjure on Emacs/Aquamacs?
  4. I was told that one can use 'lein swank' to run as a server, do you know how to do that?



我尝试的顺序(和一半成功)



我尝试过 Mac OS X Emacs ,并按照我可以使其工作的步骤。我的意思是,我可以用SLIME运行Clojure。

Sequences that I tried (and half succeeded)

I tried with Mac OS X Emacs, and by following the steps I could make it work. I mean, I could run Clojure with SLIME.

步骤1)安装 ESK


  • Git克隆并复制全部将文件添加到 .emacs.d 目录

  • 将以下代码添加到 .emacs 并重新启动

  • Git clone and copy all the files into the .emacs.d directory
  • Add the following code to .emacs and relaunch

    (when
        (load
         (expand-file-name "~/.emacs.d/package.el"))
      (package-initialize))

Step2 )使用ELPA安装

Step2) Install using ELPA


  • Mx package-list-packages选择软件包

  • 安装


    • clojure-mode,clojure-test-mode

    • slime,slime-repl

    • swank-clojure

    • M-x package-list-packages to select packages
    • Install
      • clojure-mode, clojure-test-mode
      • slime, slime-repl
      • swank-clojure
      
      ;; clojure mode
      (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-mode-1.7.1")
      (require 'clojure-mode-autoloads)
      (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/clojure-test-mode-1.4")
      (require 'clojure-test-mode-autoloads)
      
      ;; slime
      ;(setq inferior-lisp-program "/Users/smcho/bin/clojure")
      (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-20100404")
      (require 'slime-autoloads)
      (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/slime-repl-20100404")
      (require 'slime-repl-autoloads)
      
      ;; swank-clojure
      (add-to-list 'load-path "/Users/smcho/.emacs.d/elpa/swank-clojure-1.1.0")
      (require 'slime-repl-autoloads)
      



      Aquamacs



      现在我可以在Emacs上使用Clojure,相同(或非常相似)的方法再次在Aquamacs上运行Clojure。

      Aquamacs

      Now I could use Clojure on Emacs, I tried the same(or very similar) method to run Clojure on Aquamacs once more.

      步骤1)安装 Aquamacs的ESK


      • 将文件复制到〜/图书馆/偏好/ Aquamacs Emacs

      • 修改〜/ Library / Preferences / Aquamacs Emacs / Preferences.el添加以下

      
      (setq kitfiles-dir (concat (file-name-directory
                          (or (buffer-file-name) load-file-name)) "/aquamacs-emacs-starter-kit"))
      
      ; set up our various directories to load
      (add-to-list 'load-path kitfiles-dir)  
      (require 'init)
      

      Step2)
      *按照与之前相同的步骤安装所有(相同)软件包,但是Mx粘液给我以下错误消息。 Symbol的函数定义是void:define-slime-contrib

      Step2) * Follow the same step as before to install all the (same) packages, but "M-x slime" gives me the following error message. "Symbol's function definition is void: define-slime-contrib"

      来自Emacs和Aquamacs,但它们不结合。我以为我可以使用 ELPA ,而不是使用ESK分享。

      I tried to combine the packages from Emacs and Aquamacs, but they don't combine. I thought I could use the ELPA itself, not from the ESK to make it shared.

      结果不好,因为ELPA无法下载swank-conjure包。

      The result was not good, as ELPA couldn't download the swank-conjure package.

      请参考这个

      推荐答案

      Aquamacs绝对适用于Clojure,因为Clojure的作者使用它。但是,我使用Emacs,并且在Emacs部分执行上述步骤后,我建议您检查labrepl,

      Aquamacs most definitely works with Clojure, since the author of Clojure uses it. However, I use Emacs, and after you perform the steps above in the Emacs section, I recommend checking out labrepl,

      http://github.com/relevance/labrepl

      如果没有leiningen ,获取并安装它的链接是在labrepl自述文件的说明中。当我第一次学习如何设置Clojure编程环境时,我发现它非常有用。您可以在labrepl中拆分 project.clj 文件,并将它们组合起来很容易。更不用说在labrepl附带的内置Web应用程序中的课程和培训。

      If you don't have leiningen, the link to get and install it is in the instructions of the labrepl readme file. I found it extremely helpful when first learning how to set up an environment for Clojure programming. You can take apart the project.clj file in labrepl and piece together how it works pretty easily. Not to mention the lessons and training in the built in web application that comes with labrepl.

      如果要使用lein swank:

      If you want to use lein swank instead:

      确保您已安装leiningen。在您的project.clj开发人员依赖关系中,您希望拥有如下条目:

      Make sure you have leiningen installed. In your project.clj dev dependencies you want to have an entry like this:

      [leiningen/lein-swank "1.1.0"]
      

      http://clojars.org/leiningen/lein-swank

      然后完成 lein deps 你应该可以运行 lein swank ,然后从Emacs运行 Mx slime-connect ,只需按默认值输入。

      Then after you've done lein deps you should be able to run lein swank and then from within Emacs run M-x slime-connect and just press enter through the defaults.

      如果你要去这条路线,这里是直接连接leiningen的链接,所以你可以跳过labrepl存储库: http://github.com/technomancy/leiningen

      If you're going to go this route, here is the link directly to leiningen so you can skip the labrepl repository: http://github.com/technomancy/leiningen

      这篇关于Emacs(Cocoa Emacs)与Aquamacs在Mac OS X上运行Clojure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆