Fix emacs desktop support