ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <Barrie.Trel...@camtech.com.au>
Subject Ant + Emacs compilation mode (elisp code provided)
Date Thu, 20 Jul 2000 08:56:45 GMT
On 17 Jul 2000, Stefan Bodewig wrote:

> (add-hook 'compilation-mode-hook
>      '(lambda ()
>         (add-to-list 'compilation-error-regexp-alist
>                      '("^\\s-*\\[[^\\]]\\]\\s-*\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:$"
1 2 3))))
> 
> Should work - more or less untested - doesn't it?

Nope :( Its been too long since I last hacked elisp and this took way
longer that it was supposed to :)  I've also dropped the column index
from my regular expression.

The other problem was that compilation-error-regexp-alist is buffer
local so the add-list modifies the global value and the local value
stays unchanged.  If you kill the compilation buffer then it will take
its value from the global one.  The only way I could figure out to
override the default is to load the compile module so I could access
the variable's value and make the modification there.

Hope this is of help, dump it into your ~/.emacs file.

;; Compilation Mode
;; to allow it to understand ant's output
;; (for regular expression help) http://www.delorie.com/gnu/docs/elisp-manual-20/elisp_546.html
(load "compile")
(setq compile-command "ant")
(add-to-list 'compilation-error-regexp-alist 
             '("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2))


Barrie
--
Barrie Treloar
____________________________________________________________________

  Barrie Treloar                      Phone: +61 8 8303 3300
  Senior Analyst/Programmer           Fax:   +61 8 8303 4403 
  Electronic Commerce Division        Email: barrie@camtech.com.au
  Camtech (SA) Pty Ltd                http://www.camtech.com.au
 --- Level 8, 10 Pulteney Street, Adelaide SA 5000, Australia. ---
____________________________________________________________________



Mime
View raw message