save input as both prefix and postfix variant

(and move emacs code into separate folder)