Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 478 Bytes
;Function to run Tidy HTML parser on buffer
; NOTE: this requires external Tidy program.
(defun ce-tidy ()
"Run Tidy HTML parser on current buffer."
(if (get-buffer "tidy-errs") (kill-buffer "tidy-errs"))
(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'd"))
;;; ce-tidy.el ends here
Jump to Line
Something went wrong with that request. Please try again.