my attempt at integrating tidy with XEmacs

This solution is ok, but suffers from a few glitches.  In particular I 
sometimes get asked 'tidy-errs buffer has changed on disk, reload?' 
 That's not right.

Also it would be really neat if you could select an error in the tidy 
buffer and go to that point in your html.

http://www.hollenback.net/index.php?EmacsTidy

I welcome any suggestions for improvements.

; Function to run Tidy HTML parser on buffer
; NOTE: this requires external Tidy program
 (defun tidy-buffer ()
  "Run Tidy HTML parser on current buffer."
  (interactive)
  (shell-command-on-region (point-min) (point-max)
    "tidy -f /tmp/tidy-errs -q -i -wrap 72 -c" t)
  (find-file-other-window "/tmp/tidy-errs")
  (other-window 1)
  (delete-file "/tmp/tidy-errs")
  (message "buffer tidy'ed")
 )
 (global-set-key (kbd "C-x t") 'tidy-buffer)

Received on Sunday, 5 August 2001 20:14:48 UTC