Fix remaining emacs tests
Minor tidy up and test infrastructure tweaks