While I'm here, there's an obvious typo in the "LaTeX and view" command, which means
it fails to respect the

%!TEX TS-program = xelatex

directive. I fixed that, and also made it respect 'TS-program=latex', which is supposed to mean
that a Latex -> DVI -> PS -> PDF compilation path should be used, rather than PDFTeX's
straight-to-PDF compilation.

(I need this because I have a package which uses PSTricks. So although PSTricks is being
used, the text \usepackage{pstricks} doesn't appear in my actual .tex file.)

Patch attached.

Robin