Gerald E. Bennett <[EMAIL PROTECTED]> wrote:

> Is there anyway to replace the :make command in emacs to use ant?

I think there is a variable for this, yes (warning, this is XEmacs):

compile-command
  User Option: *Last shell command used to do a compilation; default for next 
compilation.

If you set this to "ant -find build.xml" and tell JDE to build using
make, you should be done (I'm using something home-brewed and
unreleasable myself).

> Is there any special parsing you need to do with the output so that
> the errors are parsed correctly?

Either invoke ant with the -emacs switch or use something like this
(FAQ is down. otherwise I would have pointed you there):

(require 'compile)
(setq compilation-error-regexp-alist
      (append (list 
               ;; works for jikes
               
'("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:" 1 2 3)
               ;; works for javac 
               ;; thanks to Barrie Treloar <[EMAIL PROTECTED]>
               '("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2))
      compilation-error-regexp-alist))

> Has anyone written any modules to do this?

Yes, there've been a couple of them, I always hoped they'd get merged
at some time, so we could include it into the Ant distribution.  At
best you search the archives at marc.theaimsgroup.com for ant-dev and
ant-user - emacs in Subject should work quite well.

Stefan

Reply via email to