Tassilo Horn wrote:
Message: 1
Date: Thu, 05 Sep 2013 11:15:17 +0200
From: Tassilo Horn<[email protected]>
To: David Kastrup<[email protected]>
Cc:[email protected]
Subject: Re: [Bug-AUCTeX] TeX-evince-sync-view
Message-ID:<[email protected]>
Content-Type: text/plain

David Kastrup<[email protected]>  writes:

>>>>AUCTeX first does
>>>>
>>>>(dbus-call-method
>>>>   :session "org.gnome.evince.Daemon"
>>>>   "/org/gnome/evince/Daemon"
>>>>   "org.gnome.evince.Daemon"
>>>>   "FindDocument"
>>>>   "file:///home/horn/some.pdf"    ;; replace with some existing PDF
>>>>   t) ;; C-x C-x here
>>>>
>>>>Does that work, i.e., open an evince window showing some.pdf?
>>>This part works, much to my surprise. I pasted the above into the
>>>scratch buffer, replaced by an existing PDF and ran M-x
>>>eval-buffer. The PDF opened in a new evince window.
>>
>>Uh, that's strange.  That's exactly what TeX-evince-sync-view does.
>
>Perhaps it is not allowed to do that.
How is lisp code run with eval-buffer different from lisp code called by
a function with respect to permissions?  I mean, how can the

   (dbus-call-method ...)

above work, but calling

   (defun TeX-evince-sync-view ()
     (dbus-call-method ...))

doesn't.

Thomas, here's something you could try as well.  Inside the auctex
buffer (the TeX-master file, if you have a multi-file doc), do

   M-: (let ((file (file-name-nondirectory
              (file-name-sans-extension
               (buffer-file-name)))))
         (TeX-evince-sync-view))

Does that work?
Now, this actually works - sort of. At least it brings up evince showing the document. However, it also opens a buffer, *Backtrace* in Emacs, saying:

   Debugger entered--Lisp error: (dbus-error "Message did not receive a
   reply (timeout by message bus)")
      dbus-call-method(:session "org.gnome.evince.Daemon"
   "/org/gnome/evince/Daemon" "org.gnome.evince.Daemon" "FindDocument"
   
"file:///home/tha/sparsig-private/kursus/p%c3%a6dagogikum2011-2013/modul5/module5.pdf"
   t)
      TeX-evince-sync-view()
      (let ((file (file-name-nondirectory (file-name-sans-extension
   (buffer-file-name))))) (TeX-evince-sync-view))
      eval((let ((file (file-name-nondirectory
   (file-name-sans-extension (buffer-file-name)))))
   (TeX-evince-sync-view)) nil)
      eval-expression((let ((file (file-name-nondirectory
   (file-name-sans-extension (buffer-file-name)))))
   (TeX-evince-sync-view)) nil)
      call-interactively(eval-expression nil nil)

Furthermore, evince blocks Emacs while open. I cannot interact with Emacs until I close the evince window again.
Thanks,

Thomas
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to