about distel
貌似不少人都碰上distel 的 node down的问题. 干脆我注册个号来发一帖.
我这边碰上过这个问题,之后查明原因是因为 node name的问题, 直接给localhost死活不认,只好给它设各名字,在.emacs里加elisp代码,让emacs中erlang起来的时候就设置一个名字,然后connect to node的时候连到这个就可以了. 或者 直接 erl -sname xxx 也可以
另外connect to remote node的时候,需要给两个node设置 相同的cookie,不然会disallow (或者别的什么东西). 用 erl -setcookie 这个我没写到elisp里,需要用的时候手动跑好了. 下面贴下我的distel setup吧.
erlang-mode 的安装就不提了.
下载: distel.el
- ;distel
- (add-to-list 'load-path "/home/yuxihe/src/distel/elisp")
- (when (locate-library "distel")
- (require 'distel)
- (distel-setup)
- (add-hook 'erlang-mode-hook
- '(lambda ()
- (unless erl-nodename-cache
- (distel-load-shell))))
- (defun distel-load-shell ()
- "Load/reload the erlang shell connection to a distel node"
- (interactive)
- ;; Set default distel node name
- (setq erl-nodename-cache 'distel@localhost)
- (setq distel-modeline-node "distel")
- (force-mode-line-update)
- ;; Start up an inferior erlang with node name `distel'
- (let ((file-buffer (current-buffer))
- (file-window (selected-window)))
- (setq inferior-erlang-machine-options '("-sname" "distel"))
- (switch-to-buffer-other-window file-buffer)
- (inferior-erlang)
- (select-window file-window)
- (switch-to-buffer file-buffer))))
如果还是node down,可以试试把这个改成
- (setq inferior-erlang-machine-options '("-sname" "distel@localhost")).
这样就跟上面的node -cache-name 匹配了.
另外,我在windows下使用distel有些问题,linux下表现良好, 报一个诡异的错误,发到maillist得知人家也有些碰上这个问题,不过他们是在 utf-8 branch的emacs上碰到问题,我是在binary release的22.1下有问题.
尝试改了下derl.el的代码,没解决,郁闷死.


Comments
我是按照这个里面的配置的
http://bc.tech.coop/blog/070528.html
没有什么问题呀, 我的是ubuntu 7.04 +emacs 22.
呵呵,给你改了 coolcode 又给你改回去了。两次!晕死!
现在来改第三次。
修改方法见: http://erlang-china.org/help
能不能把内容面板搞宽点, 现在这样忒窄了,义行看不了几个字.即便考虑通用性,现在用640*480显示器的人应该很罕见了吧.
@krzycube 用的是 wordpress 换个 theme?当前这个破效果,改了不少东西,考虑-ing。
@krzycube
嗯,按照你这个,配置 distel 成功了。严重感谢。
krzycube 的这个 el ,和 http://bc.tech.coop/blog/070528.html 的相比,主要的区别在与:直接启动了 erlang 的 shell 省去了自己去手工启动和连接 erlang node 的麻烦,省事不少。
Write a Comment