[Top][All Lists]

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

help: adapting your library to new M-x compile

From: Daniel Pfeiffer
Subject: help: adapting your library to new M-x compile
Date: Tue, 23 Dec 2003 15:54:35 +0100

My new compile v0.19


is now nearing completion.  RMS has been quite interested in the progress, so 
this should soon become the successor.

You have written code that uses compile and might be broken or affected by 
these changes.  Since I don't know what your code does, or don't have the 
programs it calls, I need your help.

- compilation-error-regexp-alist has subtly changed.  Most significantly the
  regexps must now be anchored with ^ if they match the beginning of a line.
  Else the leading .* can be dropped, making them simpler.  It now offers
  richer possibilities: detecting line/column-ranges and differentiating 3
  levels of messages.
- compilation-file-regexp-alist is gone and is also handled by
- compile-internal (which by name should never have been used) is deprecated.
  It is replaced by compilation-start and, if needed, a derived compilation
  mode.  The new grep-mode is a good example of this.
- compilation-error-list is gone.  All locating of errors is done with
  compilation-next-error (which uses text-properties).
- There is no longer a parse function you can override.  Parsing is now done
  by font-lock.  It already handles the custom cases I have identified.

An example of the result can be seen when visiting this in Emacs:


You can adapt your mode yourself.  Or send me a compiler-output it is to parse. 
 This should include all possible formats of error, warning and diagnostic 
messages and explain what the format is (file name, column numbers, etc.)  Also 
explain anything odd that is going on, which could not be handled by the old 

The things that need taking care of are:

- diff-mode.el:

A cleanup is included in my compile.el.  The question is why this needs 
compilation-minor-mode at all, only to override its commands?  Even though the 
concepts don't quite fit, it might be interesting to derive diff-mode from 
compilation-mode and let that do the parsing.

- diff.el:

This little library messes around in internal variables extensively.  IMHO it 
should be merged into diff-mode, as it offers little extra.

- progmodes/ada-mode.el: ada-compile-goto-error

This apparently deals with multiple file-names to be found in one message.  
This is now handled by the default compile.

- progmodes/ada-xref.el:

Probably mostly works.  Special setup may required a derived gnatfind-mode 
comparable to grep-mode.

- progmodes/grep.el

(not really a progmode!)  A cleanup is included in my compile.el.

- progmodes/vhdl-mode.el: vhdl-compile-init, ...

Probably works, except for vhdl-compiler-alist, which should be improved.

- textmodes/makeinfo.el

Don't know what this is up to...

- textmodes/bibtex.el: bibtex-validate

Reparsing is no longer necessary, nor even possible.

- textmodes/tex-mode.el:

Parsing classical TeX output is impossible to get right.  Make TeX use 
-file-line-error-style or -c-style-errors with normal compile.  Making this 
work together with comint for interaction is under study, and will be handled 
by my library.

- vc.el: vc-buffer-context, vc-restore-buffer-context

This apparently reparses all compilation buffers pointing to a file reverted by 
vc?  If so, that is no longer necessary: when a buffer gets reverted all 
markers to it go stale automatically.  The code must only be removed.

This requires a fairly recent Emacs 21.3.50 (a few months old should be fine, 
except if you use M-x grep).  Due to the Savannah problems, you can temporarily 
get it here:

cvs -d:ext:address@hidden:/cvs-latest/emacs ...

I will be gone for a week after XMas, but will otherwise gladly help you.

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

lerne / learn / apprends / läramå    Esperanto:

reply via email to

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