Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . auctex (11.87-1.2) unstable; urgency=low . * Raise windows on forward/reverse search. Author: Itaï BEN YAACOV --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- auctex-11.87.orig/tex.el +++ auctex-11.87/tex.el @@ -1053,24 +1053,28 @@ the requirements are met." uri t))) (if owner - (dbus-call-method - :session owner - "/org/gnome/evince/Window/0" - "org.gnome.evince.Window" - "SyncView" - (buffer-file-name) - (list :struct :int32 (line-number-at-pos) :int32 (1+ (current-column))) - :uint32 (let ((time (float-time))) - ;; FIXME: Evince wants a timestamp as UInt32, but POSIX time - ;; is too large for emacs integers on 32 bit systems. Emacs - ;; 24.2 will allow providing DBUS ints as floats, and this - ;; dbus version will be identifiable by its new variables - ;; `dbus-compiled-version' and `dbus-runtime-version'. But - ;; it seems providing just 1 as timestamp has no negative - ;; consequences, anyway. - (if (> most-positive-fixnum time) - (round time) - 1))) + (progn + (let ((wmctrl (executable-find "wmctrl"))) + (if wmctrl + (start-process "wmctrl" nil wmctrl "-R" (concat file "." (TeX-output-extension))))) + (dbus-call-method + :session owner + "/org/gnome/evince/Window/0" + "org.gnome.evince.Window" + "SyncView" + (buffer-file-name) + (list :struct :int32 (line-number-at-pos) :int32 (1+ (current-column))) + :uint32 (let ((time (float-time))) + ;; FIXME: Evince wants a timestamp as UInt32, but POSIX time + ;; is too large for emacs integers on 32 bit systems. Emacs + ;; 24.2 will allow providing DBUS ints as floats, and this + ;; dbus version will be identifiable by its new variables + ;; `dbus-compiled-version' and `dbus-runtime-version'. But + ;; it seems providing just 1 as timestamp has no negative + ;; consequences, anyway. + (if (> most-positive-fixnum time) + (round time) + 1)))) (error "Couldn't find the Evince instance for %s" uri)))) (defvar TeX-view-program-list-builtin @@ -1515,6 +1519,9 @@ or newer." (if (null buf) (message "No buffer for %s." file) (switch-to-buffer buf) + (let ((wmctrl (executable-find "wmctrl"))) + (if wmctrl + (start-process "wmctrl" nil wmctrl "-R" (frame-parameter nil 'name)))) (push-mark (point) 'nomsg) (goto-char (point-min)) (forward-line (1- line))