- From: Gary L Peskin <garyp@firstech.com>
- Date: Tue, 25 Jul 2000 15:12:35 -0700
- To: "Klotz, Leigh" <Leigh.Klotz@pahv.xerox.com>
- CC: html-tidy@w3.org
Leigh -- Isn't this what the gnu-emacs option already does? Gary "Klotz, Leigh" wrote: > > 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.
Received on Tuesday, 25 July 2000 18:13:16 UTC