Pretty-printing XML with Emacs’ NXML-mode

Did you ever get a stream of XML out of a log file, or in a data stream, and it’s all mashed together without line-breaks so that it just appears as gobble-de-gook? If there’s a data error (not an XML parsing error) then you have to read it so that you can find where the error is, but you don’t have XML-spy and NetBeans is overkill or takes forever to fire up…

Emacs to the rescue! Benjamin Ferrari wrote this increadibly useful (and simple) elisp function to pretty-print a block of XML code:

 Continue reading 

Solaris X11 and Dvorak simplified keyboard layout

I’ve recently been playing with OpenSolaris and Solaris Express DE running in VirtualBox. They’re fine so far (except audio isn’t working) but I stumbled on a usability issue that was nearly a show-stopper: dratted QWERTY layouts! The GNOME GUI for switching to Dvorak doesn’t work, and setxkbmap(1) can’t find the rules file for dvorak either (they don’t seem to be installed where the man page indicates)…

Continue reading