<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ngoc Dao wrote:
<blockquote
cite="mid:5c493e530909110009m43c0c47emd49d86b477ab6a88@mail.gmail.com"
type="cite">
<pre wrap="">I tried Distel from trunk yesterday and it did not work. The version
from download did work:
<a class="moz-txt-link-freetext" href="http://code.google.com/p/distel/downloads/list">http://code.google.com/p/distel/downloads/list</a>.
</pre>
</blockquote>
Thanks Ngoc, it works. But, still can't debug and profile, like Bill
Clementson's introduction.<br>
<br>
When I type C-c C-d i, it looks like is interpreting forever, and can't
set breakpoints to debug. I've checked the archive of this mailling
list, there is only one unresolved thread here:<br>
<blockquote><a class="moz-txt-link-freetext" href="http://groups.google.com/group/erlang-programming/browse_thread/thread/c34d5245998948c6">http://groups.google.com/group/erlang-programming/browse_thread/thread/c34d5245998948c6</a><br>
</blockquote>
Do you have more suggestions? TIA.<br>
<br>
<blockquote
cite="mid:5c493e530909110009m43c0c47emd49d86b477ab6a88@mail.gmail.com"
type="cite">
<pre wrap="">
On Thu, Sep 10, 2009 at 6:46 PM, Eric Liang <a class="moz-txt-link-rfc2396E" href="mailto:eric.l.2046@gmail.com"><eric.l.2046@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,
To build a erlang IDE, I've tried Distel in emacs22. but unfortunately it
does not work well. What I've done is exactly in accordance with Bill
Clementson's blog post:
<a class="moz-txt-link-freetext" href="http://bc.tech.coop/blog/070528.html">http://bc.tech.coop/blog/070528.html</a>
They are:
Download the latest code from : <a class="moz-txt-link-freetext" href="http://distel.googlecode.com/svn/trunk/">http://distel.googlecode.com/svn/trunk/</a>
Modify the .emacs. I did confirm the load-path and distel-dir settings are
correct. Here is it:
;; This is needed for Erlang mode setup
(setq erlang-root-dir "/usr/local/lib/erlang")
(setq load-path (cons "/usr/local/lib/erlang/lib/tools-2.5.1/emacs"
load-path))
(setq exec-path (cons "/usr/local/lib/erlang/bin" exec-path))
(require 'erlang-start)
;; This is needed for Distel setup
(let ((distel-dir "/Users/bc/Projects/distel/elisp"))
(unless (member distel-dir load-path)
;; Add distel-dir to the end of load-path
(setq load-path (append load-path (list distel-dir)))))
(require 'distel)
(distel-setup)
;; Some Erlang customizations
(add-hook 'erlang-mode-hook
(lambda ()
;; when starting an Erlang shell in Emacs, default in the node name
(setq inferior-erlang-machine-options '("-sname" "emacs"))
;; add Erlang functions to an imenu menu
(imenu-add-to-menubar "imenu")))
;; A number of the erlang-extended-mode key bindings are useful in the shell
too
(defconst distel-shell-keys
'(("\C-\M-i" erl-complete)
("\M-?" erl-complete)
("\M-." erl-find-source-under-point)
("\M-," erl-find-source-unwind)
("\M-*" erl-find-source-unwind)
)
"Additional keys to bind when in Erlang shell.")
(add-hook 'erlang-shell-mode-hook
(lambda ()
;; add some Distel bindings to the Erlang shell
(dolist (spec distel-shell-keys)
(define-key erlang-shell-mode-map (car spec) (cadr spec)))))
When I open a .erl file, it works well and Distel dose exist in the Erlang
tag of the emacs' menubar. But when I type C-M-i behind the word "cr" to
complete the function name,the emacs received this message:
Unexpected reply: [rex [badrpc [EXIT [undef ([distel rpc_entry (distel
modules ("cr"))] [rpc -handle_call/3-fun-0- 5])]]]]
I checked the code in Distel, it looks like that it will call completions()
which will call the get() by the argument:A an empty string("") in
otp_doc.erl. The function get() will call to_list() on the argument:A,which
will get the error:
*** ERROR: Shell process terminated! ***
=ERROR REPORT==== 8-Sep-2009::15:02:42 ===
Error in process <0.66.0> on node 'emacs@doubleclick' with exit value:
{undef,[{lib,format_exception,[4,error,undef,[{erl_internal,bif,[to_list,1]},{erl_lint,expr,3},{erl_lint,exprs,3},{erl_lint,exprs_opt,3},{erl_eval,check_command,2},{shell,exprs,6},{shell,eval_exprs,6},{shell,eval_loop..
I guess this is the reason for the completion failure, but have no idea how
to fix it. Can anyone here give me some advice?
As a newbie in Erlang, it's very possible I've stepped in the wrong
way.However, any suggestions will be appreciated.
Thanks in advance.
Eric
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>