Proper window focusing with emacs