How to focus on a new Emacs frame in Windows
How to get a focus for a new Emacs frame when it has been raised from outside of Emacs (for example, from emacsclient
or edit-server
)? Currently, the ne开发者_如何学JAVAw frame get input focus, but not display focus, i.e. you enter text, but it's somewhere behind other windows (in Windows OS terminology). There was a similar question and it's marked as answered, but with no solution, though.
Emacs 23.3.
The function raise-frame
can bring a frame to the front.
What version of Emacs are you running? I used put in gnuserv-visit-hook:
(select-frame-set-input-focus (window-frame (selected-window)))
But with Emacs 23, it's the default controlled by server-raise-frame
.
See also function select-frame-set-input-focus
:
"Select FRAME, raise it, and set input focus, if possible."
精彩评论