我有一个问题.我用橘子酱安装了clojure,slime,slime-repl和elein.现在我打开我的项目并打电话给elein-swank.我明白了:
Starting swank..
error in process filter: slime-presentation-init-keymaps: Symbol's function definition is void: slime-define-both-key-bindings
error in process filter: Symbol's function definition is void: slime-define-both-key-bindings
Run Code Online (Sandbox Code Playgroud)
如果我尝试clojure-jack-in,我会得到
Debugger entered--Lisp error: (error "Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.
signal(error ("Could not start swank server: That's not a task. Use \"lein help\" to list all tasks.\n"))
error("Could not start swank server: %s" "That's not a task. Use \"lein help\" to list all tasks.\n")
clojure-jack-in-sentinel(#<process …Run Code Online (Sandbox Code Playgroud) 虽然我在任何地方都设置了UTF-8(在我的lein项目中,slime-lisp组自定义,Emacs缓冲区本身......),我在尝试运行代码时不断收到此错误(def beta "?"):
Coding system iso-latin-1-unix not suitable [...]
Run Code Online (Sandbox Code Playgroud)
例如,仅在Emacs中发生,而不是在lein repl从命令行运行时发生.
可能是什么原因造成的?我正在使用Ubuntu,如果这有任何区别.
我是Emacs和Clojure的初级用户,通过一些简单的文本处理来测试我的工作环境.我在获取Slime REPL以正确打印存储在向量中的UTF-8文本时遇到问题.
我首先将文件(Tocharian B的字典)的内容读入一个向量:
user> (def toch
(with-open [rdr (java.io.BufferedReader.
(java.io.FileReader. "/directory/toch.txt"))]
(vec (line-seq rdr))))
=> #'user/toch
Run Code Online (Sandbox Code Playgroud)
然后我尝试从向量中获取一行,然后我得到了垃圾:
user> (toch 44)
=> " Examples : /// kektse?±e akappi ste ‚Äòthe body is an impurity‚Äô (121b5), akappƒ´ = BHS a?õuci·?É (529a3). "
Run Code Online (Sandbox Code Playgroud)
我可以将字符串输入Slime REPL并将其恢复原样:
user> " Examples : /// kektseñe akappi ste ‘the body is an impurity’ (121b5), akapp? = BHS a?uci? (529a3). "
=> " Examples : /// kektseñe akappi ste ‘the body is an impurity’ (121b5), akapp? = BHS …Run Code Online (Sandbox Code Playgroud) 我正在使用emacs和swank-clojure.如何解决以下情况 -
如何让现有的slime会话加载新的依赖项?
谢谢,穆尔塔扎
我的 project.clj 文件看起来像这样
(defproject cljs-template "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.4.0-beta4"]
[noir-cljs "0.3.0"]
[fetch "0.1.0-alpha2"]
[noir "1.3.0-beta2"]
[org.clojure/core.cache "0.5.0"]
[com.datomic/datomic "0.1.3142"
:exclusions [org.slf4j/slf4j-nop org.slf4j/slf4j-log4j12]]
[ch.qos.logback/logback-classic "1.0.1"]]
:plugins [[lein-swank "1.4.3"]]
;:cljsbuild {:builds [{}]}
:main ^{:skip-aot true} cljs-template.server)
Run Code Online (Sandbox Code Playgroud)
我的 /src/cljs_template/server.clj 开始如下:
(ns cljs-template.server
(:require [noir.server :as server]
[noir.cljs.core :as cljs]
[cljs-template.tree :as tree])
(:use [datomic.api :only [db q] :as d]))
Run Code Online (Sandbox Code Playgroud)
然后我启动 swank,在其中运行 (in-ns 'cljs-template.server),将光标移动到 (ns) 函数调用的末尾,并尝试使用 Ctrl-x Ctrl- 运行 (ns) 方法e. 当我这样做时,我收到以下错误。
No message.
[Thrown class java.lang.ExceptionInInitializerError]
Restarts: …Run Code Online (Sandbox Code Playgroud) 是否有可能以新东西添加到类路径(如编辑project.clj和运行lein deps),然后将其导入到现有Clojure的会议?
这是,无需断开然后再次连接.
我正在尝试用clojure写一个helloworld.我正在使用leinengen和emacs以及swank-clojure.
这是我的src/hello.clj内容:
(ns hello)
(defn hello []
(println "Hello World"))
Run Code Online (Sandbox Code Playgroud)
当我clojure-jack-in和我C-c C-c的功能,我得到:
No such namespace: hello
[Thrown class java.lang.Exception]
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?