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

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

问题描述

我使用 Aquamacs 到目前为止,我需要安装并运行 Clojure 使用 SLIME 。我googled得到一些方法使用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 ,并按照我可以使其工作的步骤。我的意思是,我可以运行Clojure与SLIME。

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


  • 将文件添加到 .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

      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


      • 将文件复制到〜 Library / Preference / 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)
      


      b $ b

      Step2)
      *按照与之前相同的步骤安装所有(相同)软件包,但Mx slime给我以下错误消息。 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 文件,一起工作很容易。

      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 dev依赖项中,你想有一个这样的条目:

      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)vs Aquamacs在Mac OS X上运行Clojure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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