emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new style Emacs compile


From: Daniel Pfeiffer
Subject: new style Emacs compile
Date: Thu, 27 Nov 2003 19:29:38 +0100

[For those who'd received this two days ago, this fixes directory nesting and 
line numbering in 2nd error of a file.  And grep works again.]

This is a reimplementation of error locating in Emacs `compile'.  Error 
locations only became mouse-sensitive rather late, and were often somehow 
forgotten again.  Or when clicking on one, it would jump to a different file.

The output parser causing this has now been eliminated and replaced by 
font-lock.  The two were already running redundantly (unless you inexcusably 
don't use font-lock, which structures plain text visually very well).

Warnings and plain messages now come in less intimidating colours, like mostly 
green in grep, and orange for warnings.  So far, only GNU style messages have 
been enhanced for this.  There is now also a usual 
`compilation-mode-font-lock-keywords' and it nicely handles all the checks that 
configure outputs and -o options so you see at a glance where you are.

Instead of a hard to customize `compilation-error-regexp-alist', you can now 
also use symbolic match-structures.  Currently the only one is 
`compilation-gnu-messages'.

For those writing the regexps, there is a debug feature to see which matcher 
some highlighting came from.

To use this, install it as compile.el somewhere early (site-lisp) in you 
load-path, and it'll get the stuff it needs from the original compile.el 
automatically.  This patches a rather recent (Nov 23) CVS Emacs, so, if older, 
you also need to update at least the original compile.el and if you use it 
grep.el from savannah CVS.

http://dapfy.bei.t-online.de/compile.el
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/

TODO (this is still a prototype, so bear with me):

- File name format lists aren't allowed.  In the future they will be added to 
the file index, i.e. 3 or (3 fmt1 fmt2 ...)

- The compilation minor modes are not supported.  The thing to do is probably 
to prepend our font-lock-keywords to theirs.

When this modified library is loadad, the following libraries and functions 
probably have problems in their interaction with  M-x compile  (or their own 
variant thereof):

diff-mode.el: diff-mode
diff.el: diff
eshell/em-unix.el: ???
net/tramp-util.el: tramp-compile
progmodes/ada-mode.el: ada-compile-goto-error
progmodes/ada-xref.el: ...
progmodes/vhdl-mode.el: vhdl-compile-init, ...
textmodes/bibtex.el: bibtex-validate
textmodes/tex-mode.el: tex-mode, ...
vc.el: vc-buffer-context, vc-restore-buffer-context

coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer

-- 
lerne / learn / apprends / läramå    Esperanto:
                              http://lernu.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]