monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 26a6266ad717ec64cadf17fbf78619d74e012922
Author: Tassilo Horn <[email protected]>
Date: Mon Apr 15 10:52:06 2013 +0200
Raise frame on backward search.
* tex.el (TeX-source-correlate-sync-source): Raise frame when
placing point on the source location.
---
ChangeLog | 5 +++++
tex.el | 14 +++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bb2b0c2..739010c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-15 Tassilo Horn <[email protected]>
+
+ * tex.el (TeX-source-correlate-sync-source): Raise frame when
+ placing point on the source location.
+
2013-04-12 Mos� Giordano <[email protected]>
* Makefile.in (STYLESRC): Add style/acro.el and style/acronym.el.
diff --git a/tex.el b/tex.el
index e82fce3..ca246e7 100644
--- a/tex.el
+++ b/tex.el
@@ -1494,10 +1494,11 @@ You could use this for unusual mouse bindings.")
(defun TeX-source-correlate-sync-source (file linecol &rest ignored)
"Show TeX FILE with point at LINECOL.
-This function is called when emacs receives a SyncSource signal
-emitted from the Evince document viewer. IGNORED absorbs an
-unused id field accompanying the DBUS signal sent by Evince-3.0.0
-or newer."
+If the external wmctrl program is installed, the emacs frame will
+also be risen. This function is called when emacs receives a
+SyncSource signal emitted from the Evince document viewer.
+IGNORED absorbs an unused id field accompanying the DBUS signal
+sent by Evince-3.0.0 or newer."
;; FILE may be given as relative path to the TeX-master root document or as
;; absolute file:// URL. In the former case, the tex file has to be already
;; opened.
@@ -1521,7 +1522,10 @@ or newer."
(goto-char (point-min))
(forward-line (1- line))
(unless (= col -1)
- (move-to-column col)))))
+ (move-to-column col))
+ (let ((wmctrl (executable-find "wmctrl")))
+ (when wmctrl
+ (start-process "wmctrl" nil wmctrl "-R" (frame-parameter nil
'name)))))))
(define-minor-mode TeX-source-correlate-mode
"Minor mode for forward and inverse search.