[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/tex.el,v
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] Changes to auctex/tex.el,v |
Date: |
Tue, 10 Apr 2012 19:19:29 +0000 |
CVSROOT: /sources/auctex
Module name: auctex
Changes by: Tassilo Horn <tsdh> 12/04/10 19:19:29
Index: tex.el
===================================================================
RCS file: /sources/auctex/auctex/tex.el,v
retrieving revision 5.690
retrieving revision 5.691
diff -u -b -r5.690 -r5.691
--- tex.el 8 Apr 2012 09:37:39 -0000 5.690
+++ tex.el 10 Apr 2012 19:19:28 -0000 5.691
@@ -1003,21 +1003,30 @@
:group 'TeX-view
:type '(alist :key-type symbol :value-type (group sexp)))
-(defun TeX-evince-dbus-p ()
- "Return non-nil, if evince is installed and accessible via its
-DBUS interface."
+(defun TeX-evince-dbus-p (&rest options)
+ "Return non-nil, if evince is installed and accessible via DBUS.
+Additional OPTIONS may be given to extend the check. If none are
+given, only the minimal requirements needed by backward search
+are checked. If OPTIONS include `:forward', which is currently
+the only option, then additional requirements needed by forward
+search are checked, too."
(and (fboundp 'dbus-register-signal)
(fboundp 'dbus-call-method)
(require 'dbus)
(getenv "DBUS_SESSION_BUS_ADDRESS")
(executable-find "evince")
- (member
- "org.gnome.evince.Daemon"
- (dbus-introspect-get-interface-names
+ (if (memq :forward options)
+ (dbus-introspect-get-method
:session "org.gnome.evince.Daemon"
- "/org/gnome/evince/Daemon"))))
+ "/org/gnome/evince/Daemon"
+ "org.gnome.evince.Daemon"
+ "FindDocument"))))
(defun TeX-evince-sync-view ()
+ "Focus the focused page/paragraph in Evince with the position
+of point in emacs by using Evince's DBUS API. Used by default
+for the Evince viewer entry in `TeX-view-program-list-builtin' if
+the requirements are met."
(let* ((uri (concat "file://" (expand-file-name
(concat file "." (TeX-output-extension)))))
(owner (dbus-call-method
@@ -1035,7 +1044,7 @@
"SyncView"
(buffer-file-name)
(list :struct :int32 (line-number-at-pos) :int32 1)
- (round (float-time)))
+ :uint32 (float-time))
(error "Couldn't find the Evince instance for %s" uri))))
(defvar TeX-view-program-list-builtin
@@ -1066,7 +1075,7 @@
("dvips and gv" "%(o?)dvips %d -o && gv %f")
("gv" "gv %o")
("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)")))
- ("Evince" ,(if (TeX-evince-dbus-p)
+ ("Evince" ,(if (TeX-evince-dbus-p :forward)
'TeX-evince-sync-view
`("evince" (mode-io-correlate
;; With evince 3, -p N opens the page *labeled*
N,
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/08
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/08
- [AUCTeX-diffs] Changes to auctex/tex.el,v,
Tassilo Horn <=
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/11
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/11
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/11
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/25
- [AUCTeX-diffs] Changes to auctex/tex.el,v, Tassilo Horn, 2012/04/26