Message: 1
Date: Thu, 05 Sep 2013 11:15:17 +0200
From: Tassilo Horn<address@hidden>
To: David Kastrup<address@hidden>
Cc:address@hidden
Subject: Re: [Bug-AUCTeX] TeX-evince-sync-view
Message-ID:<address@hidden>
Content-Type: text/plain
David Kastrup<address@hidden> 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?
>Viewers in AUCTeX are started without connection to a buffer/terminal
>if I remember correctly, so you would not get to see any error
>messages or bad exist codes. Perhaps you need to change the "View"
>entry appropriately to a function not completely detaching the process
>in order to get some more information there.
TeX-evince-sync-view doesn't start evince in terms of start-process or
call-process. It calls a evince method via DBUS, and that will make
evince start and show the document if it doesn't already do so.
Bye,
Tassilo