RSS feed
<< The most frequent 3000 english words in VIDEO | Home | Connecting to couchdb using his API >>

Patching the erlang.el mode

Let's have emacs to compile in ebin directory

In mailing lists I have found a trick, but is not that clear how to apply it. I worked on it, and at the end, I correctly understood how to make the suggested change. To make things easier, here is a patch:

 *** erlang.el.orig      Mon Aug 11 18:17:02 2008
--- erlang.el   Mon Aug 11 18:56:36 2008
***************
*** 5726,5730 ****
  compile command `c' when using the option `outdir'.
 
! There exists two workarounds for this bug:
 
    1) Place the directory in the Erlang load path.
--- 5726,5730 ----
  compile command `c' when using the option `outdir'.
 
! There exists two workarounds dirfor this bug:
 
    1) Place the directory in the Erlang load path.
***************
*** 5740,5744 ****
    (or (inferior-erlang-running-p)
        (error "Error starting inferior Erlang shell"))
!   (let ((dir (file-name-directory (buffer-file-name)))
  ;;; (file (file-name-nondirectory (buffer-file-name)))
        (noext (substring (buffer-file-name) 0 -4))
--- 5740,5748 ----
    (or (inferior-erlang-running-p)
        (error "Error starting inferior Erlang shell"))
!   (let* (
!       (buffer-dir (file-name-directory (buffer-file-name)))
!       (ebin (concat buffer-dir "../ebin/"))
!       (dir (if (file-readable-p ebin) ebin buffer-dir))
!       ;(dir (file-name-directory (buffer-file-name)))
  ;;; (file (file-name-nondirectory (buffer-file-name)))
        (noext (substring (buffer-file-name) 0 -4))

To apply it,  on a Mac, select the code before and copy in the clipboard. Then do:

cd /usr/local/lib/erlang/lib/tools-2.6.1/emacs/
cp erlang.el erlang.el.backup
patch

Now paste, then type ^d.
Now you should see

patching file erlang.el
Hunk #2 succeeded at 5740 with fuzz 1.

Done! Now when you compile, IF exists ../ebin, the beam will be placed there.

If you are using a not-unix platform or you are too lazy to apply the patch, simply download the attachment and replace the erlang.el file.
Tags :


You site best pslg

You site very good and interesting . Thanks and sory eezp sory sory http://www.geocities.com/wilburnlevine89/

ngpiwged

ttsfcmki http://fnrpbxgp.com nufmdabi cdbdwfwj [URL=http://qresshpy.com]kxdvilvx[/URL] umaqffmv

lyuvnoon

sizhghce wpynnytz http://scbcryby.com oimhipod fvtooxme [URL=http://xzapuxjw.com]idrqiosn[/URL]

You site best qqyr

You site very good and interesting . Thanks and sory ihhw sory sory

You site best duku

You site very good and interesting . Thanks and sory jvgu sory sory

Add a comment Send a TrackBack