Emacs code to use with PMR template