bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] TeX-evince-sync-view


From: Thomas Arildsen
Subject: Re: [Bug-AUCTeX] TeX-evince-sync-view
Date: Wed, 11 Sep 2013 20:26:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Den 05-09-2013 18:00, address@hidden skrev:
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
I am swamped with teaching these days. I will find time to investigate this further next week, so we can get to the bottom of this.
Thanks so far,

Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]