Variable: TeX-raise-frame-function
TeX-raise-frame-function is a customizable variable defined in tex.el.
Value
raise-frame
Documentation
A function which will be called to raise the Emacs frame.
The function is called after TeX-source-correlate-sync-source
has processed an inverse search DBUS request from
Evince-compatible viewers in order to raise the Emacs frame.
The default value is raise-frame, however, depending on window
manager and focus stealing policies, it might very well be that
Emacs doesn't pop into the foreground. So you can do whatever it
takes here.
For some users, x-focus-frame does the trick. For some
users (on GNOME 3.20),
(lambda ()
(run-at-time 0.5 nil #'x-focus-frame))
does the trick. Some other users use the external wmctrl tool to raise the Emacs frame like so:
(lambda ()
(call-process
"wmctrl" nil nil nil "-i" "-R"
(frame-parameter (selected-frame) 'outer-window-id)))
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defcustom TeX-raise-frame-function #'raise-frame
"A function which will be called to raise the Emacs frame.
The function is called after `TeX-source-correlate-sync-source'
has processed an inverse search DBUS request from
Evince-compatible viewers in order to raise the Emacs frame.
The default value is `raise-frame', however, depending on window
manager and focus stealing policies, it might very well be that
Emacs doesn't pop into the foreground. So you can do whatever it
takes here.
For some users, `x-focus-frame' does the trick. For some
users (on GNOME 3.20),
(lambda ()
(run-at-time 0.5 nil #\\='x-focus-frame))
does the trick. Some other users use the external wmctrl tool to
raise the Emacs frame like so:
(lambda ()
(call-process
\"wmctrl\" nil nil nil \"-i\" \"-R\"
(frame-parameter (selected-frame) \\='outer-window-id)))"
:type 'function
:group 'TeX-view)