CVSROOT:        /sources/auctex
Module name:    auctex
Changes by:     Tassilo Horn <tsdh>     12/04/11 07:19:20

Index: tex.el
===================================================================
RCS file: /sources/auctex/auctex/tex.el,v
retrieving revision 5.692
retrieving revision 5.693
diff -u -b -r5.692 -r5.693
--- tex.el      11 Apr 2012 06:38:26 -0000      5.692
+++ tex.el      11 Apr 2012 07:19:20 -0000      5.693
@@ -1015,12 +1015,23 @@
        (require 'dbus)
        (getenv "DBUS_SESSION_BUS_ADDRESS")
        (executable-find "evince")
-       (if (memq :forward options)
-          (dbus-introspect-get-method
+       (or (not (memq :forward options))
+          (let ((spec (dbus-introspect-get-method
            :session "org.gnome.evince.Daemon"
            "/org/gnome/evince/Daemon"
            "org.gnome.evince.Daemon"
-           "FindDocument"))))
+                       "FindDocument")))
+            ;; FindDocument must exist, and its signature must be (String,
+            ;; Boolean, String).  Evince versions between 2.30 and 2.91.x
+            ;; didn't have the Boolean spawn argument we need to start evince
+            ;; initially.
+            (and spec
+                 (equal '("s" "b" "s")
+                        (delq nil (mapcar (lambda (elem)
+                                            (when (and (listp elem)
+                                                       (eq (car elem) 'arg))
+                                              (cdr (caar (cdr elem)))))
+                                          spec))))))))
 
 (defun TeX-evince-sync-view ()
   "Focus the focused page/paragraph in Evince with the position

_______________________________________________
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs

Reply via email to