[Unit]
Description=Emacs
[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon=%i --chdir %h
ExecStop=/usr/bin/emacsclient --server-file=hud --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
Restart=always
TimeoutStartSec=0
[Install]
WantedBy=default.target