Mandar Mitra | 2 Apr 2012 21:34
Picon

forward / backward with evince

If I use the dbus-based solution given in

http://ubuntuforums.org/showthread.php?t=1716268 

for forward search with evince, the target location is marked by a red
rectangle. This is also how its done for xdvi (with source specials).

But the default forward search provided by auctex only specifies a page
number. Can the solution given above be incorporated into auctex's forward
search mechanism?

Thanks,
Mandar.

[ Sorry if this is a FAQ or if this has already been done for the
  development version. I'm running auctex 11.86 on Ubuntu 11.10.  ]
Tassilo Horn | 3 Apr 2012 20:38
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

> If I use the dbus-based solution given in
>
> http://ubuntuforums.org/showthread.php?t=1716268 
>
> for forward search with evince, the target location is marked by a red
> rectangle. This is also how its done for xdvi (with source specials).
>
> But the default forward search provided by auctex only specifies a
> page number.  Can the solution given above be incorporated into
> auctex's forward search mechanism?

I had a quick look, and the difference in that AUCTeX just calls evince
with some special command line while the python script in the ubuntu
forum sends a DBUS signal that just does the right thing inside evince.

Shouldn't be hard to do the same from AUCTeX.  I'll add it to my todo
list.  Don't hold your breath, but I'll try to do it ASAP.

Bye,
Tassilo
Tassilo Horn | 4 Apr 2012 21:24
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

Hi Mandar,

> But the default forward search provided by auctex only specifies a
> page number. Can the solution given above be incorporated into
> auctex's forward search mechanism?

I've implemented the forward search for evince using its DBUS interface
now.  It works fine for me, but before I commit, could you please check
if it also does the trick for you?

The attached patch is against the current CVS version of AUCTeX.

Bye,
Tassilo

Attachment (evince-dbus.patch): text/x-patch, 2841 bytes
_______________________________________________
auctex mailing list
auctex <at> gnu.org
https://lists.gnu.org/mailman/listinfo/auctex
Tassilo Horn | 8 Apr 2012 11:39
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

Hi Mandar,

> But the default forward search provided by auctex only specifies a
> page number. Can the solution given above be incorporated into
> auctex's forward search mechanism?

I've implemented forward search for Evince via dbus now.  Could you
please give it (AUCTeX CVS version) a shot?

Bye,
Tassilo
Mandar Mitra | 8 Apr 2012 16:48
Picon

Re: forward / backward with evince

Tassilo Horn wrote (Sun, Apr 08, 2012 at 11:39:20AM +0200):

> I've implemented forward search for Evince via dbus now.  Could you
> please give it (AUCTeX CVS version) a shot?

Thank you so much! Also, apologies for having disappeared after making
the request.

I'm running Ubuntu 10.04 at home, and this may not work with the
versions of evince / dbus available. (I couldn't get evince_forward_search
from the Ubuntuforums post to work on this machine.)

I'll try this on my work machine tomorrow and report. 

Thanks again,
Mandar.
Tassilo Horn | 8 Apr 2012 19:14
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

Hi Mandar,

> I'm running Ubuntu 10.04 at home, and this may not work with the
> versions of evince / dbus available. (I couldn't get
> evince_forward_search from the Ubuntuforums post to work on this
> machine.)

For dbus support, you need at least emacs 23.1.  I think evince had its
dbus interface from some 2.x version on.  To check what forward search
implementation is used, check what's in the View prompt.  If there's
TeX-evince-sync-view in the prompt, it's the dbus variant.

> I'll try this on my work machine tomorrow and report. 

Ok, thanks.

Bye,
Tassilo
Mandar Mitra | 9 Apr 2012 09:05
Picon

Re: forward / backward with evince

Tassilo Horn wrote (Sun, Apr 08, 2012 at 07:14:21PM +0200):
> 
> For dbus support, you need at least emacs 23.1.  I think evince had its
> dbus interface from some 2.x version on.  To check what forward search
> implementation is used, check what's in the View prompt.  If there's
> TeX-evince-sync-view in the prompt, it's the dbus variant.

Tried this on my home machine after all (Ubuntu 10.04). I'm running
emacs 23.2. Installed from CVS, and get the following message on running
View:

TeX-evince-sync-view: D-Bus error: "Method \"FindDocument\" with signature \"sb\" on interface
\"org.gnome.evince.Daemon\" doesn't exist" [3 times]

I'm guessing the problem is with evince (2.30). More updates after I try
on the office machine.

Thanks,
Mandar.
Tassilo Horn | 9 Apr 2012 10:41
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

Hi Mandar,

>> For dbus support, you need at least emacs 23.1.  I think evince had
>> its dbus interface from some 2.x version on.  To check what forward
>> search implementation is used, check what's in the View prompt.  If
>> there's TeX-evince-sync-view in the prompt, it's the dbus variant.
>
> Tried this on my home machine after all (Ubuntu 10.04). I'm running
> emacs 23.2. Installed from CVS, and get the following message on
> running View:
>
> TeX-evince-sync-view: D-Bus error: "Method \"FindDocument\" with signature
> \"sb\" on interface \"org.gnome.evince.Daemon\" doesn't exist" [3 times]
>
> I'm guessing the problem is with evince (2.30). More updates after I
> try on the office machine.

Could you check the correct signature for this version of evince?  I use
the d-feet tool for that.  A screenshot of how the evince daemon 3.2.1
interface looks is here:

  http://imagebin.org/207295

Bye,
Tassilo
Mandar Mitra | 10 Apr 2012 17:32
Picon

Re: forward / backward with evince

Tassilo Horn wrote (Mon, Apr 09, 2012 at 10:41:36AM +0200):
> 
> Could you check the correct signature for this version of evince?  I use
> the d-feet tool for that.

Thanks! That's a useful thing to know. 

The version of evince on Ubuntu 10.04 doesn't support the FindDocument
method after all.

Meanwhile, I tried the CVS version on my work machine (Lubuntu 11.10).
The default "View command" is TeX-evince-sync-view, so I'm assuming the
CVS version is actually getting used. 

But I keep getting the following sort of error on typing C-c C-v:

TeX-evince-sync-view: Arithmetic range error: "round", 1334070937.742052

But ~/bin/evince_synctex/evince_forward_search and the corresponding
backward search from the solution provided on the Ubuntuforums page that
I mentioned earlier does work.

Is there anything I can do to help track this error down?

Thanks,
Mandar.
Tassilo Horn | 10 Apr 2012 20:25
Picon
Gravatar

Re: forward / backward with evince

Mandar Mitra <mandar.mitra <at> gmail.com> writes:

Hi Mandar,

>> Could you check the correct signature for this version of evince?  I
>> use the d-feet tool for that.
>
> Thanks! That's a useful thing to know. 

Yes, that's a pretty handy tool.  I only wish it could also show the
documentation for the dbus interfaces.

> The version of evince on Ubuntu 10.04 doesn't support the FindDocument
> method after all.

Ah, ok.  Then the forward search via DBUS will be available only for
evince versions that have that DBUS method.  (See the explanation
below.)

> Meanwhile, I tried the CVS version on my work machine (Lubuntu 11.10).
> The default "View command" is TeX-evince-sync-view, so I'm assuming
> the CVS version is actually getting used.

Yep.

> But I keep getting the following sort of error on typing C-c C-v:
>
> TeX-evince-sync-view: Arithmetic range error: "round", 1334070937.742052

Ok, I see.  I guess, you are using a 32 bit system.  On 32 bit systems,
(Continue reading)


Gmane