【发布时间】:2012-02-01 05:19:31
【问题描述】:
我正在从我的 ClojureBox 安装连接到一个 swank 服务器。 IE。 lein swank 来自我的项目目录,然后M-x slime-connect 来自 EmacsW32。
但是,当我这样做时,我会在 REPL (^M) 中看到到处都是 DOS 行尾。即
user> (doc map)
-------------------------^M
clojure.core/map^M
([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])^M
Returns a lazy sequence consisting of the result of applying f to the
set of first items of each coll, followed by applying f to the set
of second items in each coll, until any one of the colls is
exhausted. Any remaining items in other colls are ignored. Function
f should accept number-of-colls arguments.^M
nil
user> (println "foo")
foo^M
我知道这与平台编码有关,但我无法弄清楚如何抑制它们。我在 EmacsW32 菜单中四处寻找并尝试了 java 命令行系统属性(在 lein.bat 中)-Dfile.encoding=ISO-8859-1 无济于事。
我还发现了其他关于在缓冲区中全局查找/替换 ^M 的问题 - 但我想过滤 REPL 输出。
我还在*inferior-lisp* 缓冲区中注意到以下内容:
(do (.. java.net.InetAddress getLocalHost getHostAddress) nil)(swank.swank/start-server "c:/Users/noahz/AppData/Local/Temp/slime.4912" :encoding "iso-latin-1-unix")
【问题讨论】:
标签: emacs clojure read-eval-print-loop line-endings