Tim Retout's www presence

Sat, 21 Mar 2009

Flymake and XML on Debian

Flymake is an emacs minor mode that runs a syntax check tool over source files as you write them, on the fly. Essentially it calls the compiler for the relevant language and then parses the warnings.

Because this is so obviously useful, I have it turned on by default in .emacs:

; Highlight syntax errors
(require 'flymake)
(add-hook 'find-file-hook 'flymake-find-file-hook)

Recall also that I use emacs to view page source in Epiphany. Unfortunately, this produced a nasty dialog box warning about not being able to find an 'xml' command.

The solution comes in two parts:

  • Install the 'xmlstarlet' package.
  • If you are using the emacs-snapshot package rather than emacs22, the fix to Bug #447378 is not yet applied. (I've mailed the maintainer.) Until then, it is simple to redefine flymake-xml-init in .emacs:
    ;;;; xml-specific init-cleanup routines
    (defun flymake-xml-init ()
      (list "xmlstarlet" (list "val" (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace))))
    

I suppose both emacs packages should really Suggest xmlstarlet - I wonder how many other external programs might fall into that category.

Posted: 21 Mar 2009 00:00 | Tags: , , ,

Contact

Tim Retout tim@retout.co.uk
JabberID: tim@retout.co.uk

Comments

I'm afraid I have turned off comments for this blog, because of all the spam. Let's face it, I didn't read them anyway. Feel free to email me.

Me Elsewhere

Copyright © 2007-2014 Tim Retout