Assorted Idiocy

Pictures, songs, randomness, whatever.
Jul 25
Permalink
Jul 21
Permalink
Jul 07
Permalink
Now it’s just editing and sound…

Now it’s just editing and sound…

Jun 30
Permalink
Jun 26
Permalink
Jun 11
Permalink

Fix XML files in Emacs

(defun pretty-print-xml ()
  "Pretty format XML markup. You need to have nxml-mode http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do this.  The function inserts linebreaks to separate tags that have nothing but whitespace between them.  It then indents the markup by using nxml's indentation rules. A variant of the code found at http://blog.bookworm.at/2007/03/pretty-print-xml-with-emacs.html"
  (interactive)
  (nxml-mode)
  (goto-char (point-min))
  (while (search-forward-regexp "\>[ \\t]*\<" nil t)
    (backward-char) (insert "\n"))
  (indent-region (point-min) (point-max) nil)
  (message "Ah, much better!"))

Jun 08
Permalink
May 23
Permalink
  • <undeadTed> wasps are stupid and agressive
  • <undeadTed> they're chavs. wasps are chavs.
  • <undeadTed> stupid, obnoxiously attired, and at the end of the week/summer they get drunk, stumble around, and try to assault anyone they don't like the look of
Apr 19
Permalink
Apr 17
Permalink