Tidy and Emacs 20.4.1

I'm using Tidy under Emacs 20.4.1.  I'd like to use tidy with the "m-x
compile" command, where Emacs automagically parses the output and offers a
mouse-sensitive listing of errors and warnings; clicking on the error line
(or typing a key sequence) tells Emacs to find the file and position the
cursor at the point of error.  This feature already works with gcc, javac,
etc.

There are two ways to accomplish this integration:
(1) change emacs to know how to parse tidy's output
(2) change tidy to output in one of the many forms Emacs already understands

I'd prefer (2) under flag control, because the feature would then be
self-documenting in "tidy -h"
and would not require any changes to Emacs.  Also, it's difficult to develop
a regular expression
matching Tidy's output because the filename does not occur in each message,
and so a special parsing
function would have to be written to search for the filenames.

For (2), here is the alternate format I propose for error messages:

	File "AccessRepositories.html", line 24, character 1 - Warning:
<table> lacks "summary" attribute

The only change that cannot easily be accomplished simply by using an
alternate message from the TidyMessages
file is that the filename must be on each line.  I hacked this up in JTidy
by adding a static private variable to
Report and having JTidy use a setter function to set the value the value to
the filename.  (In the stream case
it hardly matters since Emacs will not be able to locate the stream anyway.)
The use of a static variable cause problems with multi-threaded use of
Report; a more complex alternative would be to pass a file context around to
each call to report.

I'd be willing to provide source for this for Jtidy and help with the
tidy.exe version as well, if it's seen as a valuable addition.


-----Original Message-----
From: Dave Raggett [mailto:dsr@w3.org]
Sent: Tuesday, July 25, 2000 11:03 AM
To: html-tidy@w3.org
Subject: delayed release



I still have several things to do before the next release and hence
won't have time to do a release today after all. My plan is to work
through the pressing items and make a release next week.

Thanks for your patience.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
tel/fax: +44 122 578 3011 (or 2521) +44 778 532 0444 (mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Tuesday, 25 July 2000 17:05:46 UTC