[erlang-questions] Autosaving *.erl in emacs before compilation

Kirill Zaborski <>
Wed Jun 27 15:57:00 CEST 2007


Reberto wrote "Emakefile" so I think he knows the difference :)

Regards,
Kirill.

On 6/27/07, Bob Ippolito <> wrote:
make:all() doesn't need a makefile.
>
> This function first looks in the current working directory for a file
> named Emakefile (see below) specifying the set of modules to compile
> and the compile options to use. If no such file is found, the set of
> modules to compile defaults to all modules in the current working
> directory.
>
> -bob
>
> On 6/27/07, Roberto Saccon <> wrote:
> > Interesting approach, thanks for sharing. There is one this however I
> > do not understand from looking at your elisp code: make:all() looks in
> > the directory  where the VM has started for an Emakefile. How does
> > that magically happen with your approach, if you have a folder
> > structure with several source directories, each one with its own
> > Emakefile ?
> >
> > regards
> > Roberto
> >
> > On 6/27/07, Alexey Lebedeff <> wrote:
> > >
> > >  RS> Does anybody know how to also add the distel module reloading to the
> > >  RS> compile shortcut ?
> > >
> > > I'm using following function to compile and load erlang programs.
> > > It issues "make:all([load])." command to remote node, so i can edit(with
> > > Tramp) and compile files on remote machines.
> > >
> > > (defun erlang-remote-compile ()
> > >   (interactive)
> > >   (save-some-buffers (not compilation-ask-about-save) nil)
> > >   (save-excursion
> > >     (let ((thisdir default-directory))
> > >       (with-current-buffer (get-buffer-create "*erl-output*")
> > >         (setq default-directory thisdir)
> > >         (erase-buffer)
> > >         (compilation-mode)
> > >         (toggle-read-only nil)
> > >         (setq compilation-current-error nil)
> > >         (display-buffer (current-buffer))
> > >         (erl-spawn
> > >           (erl-send-rpc (erl-target-node)
> > >                         'distel
> > >                         'eval_expression
> > >                         (list "make:all([load])."))
> > >           (erl-receive ()
> > >               ((['rex ['ok string]]
> > >                 (insert string))
> > >                (['rex ['error reason]]
> > >                 (insert reason))
> > >                (other
> > >                 (message "Unexpected: %S" other)))))))))
> > >
> > >
> > >
> > >
> > >  RS> I tried with:
> > >
> > >  RS> (global-set-key [f9] (lambda () (interactive) (progn (save-buffer)
> > >  RS> (erlang-compile) (erl-reload-modules))))
> > >
> > >  RS> but got this error message:
> > >
> > >  RS> Waiting for Erlang shell prompt (press C-g to abort). [2 times]
> > > progn>: Wrong number of arguments: (lambda (node) "reload all out-of-date
> > >  RS> modules" (interactive (list (erl-target-node))) (erl-rpc (lambda
> > >  RS> (result) (message "load: %s" result)) nil node (quote distel) (quote
> > >  RS> reload_modules) nil)), 0
> > >
> > >  RS> -- Roberto Saccon _______________________________________________
> > >  RS> erlang-questions mailing list 
> > >
> > > http>://www.erlang.org/mailman/listinfo/erlang-questions
> > >
> > >
> > > --
> > > [1180'99:11-6a] [BMSTU:AK5-111]
> > >
> >
> >
> > --
> > Roberto Saccon
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list