[Top][All Lists]

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

Re: Atril and D-BUS

From: Tassilo Horn
Subject: Re: Atril and D-BUS
Date: Mon, 21 Nov 2022 19:55:26 +0100
User-agent: mu4e 1.9.3; emacs 29.0.50

Ikumi Keita <> writes:

Hi Keita,

> AUCTeX suggests `TeX-atril-sync-view' as default when I run "View"
> command at C-c C-c. Whereas my atril opens the pdf file successfully
> when I accept that default, emacs complains as follows:
> ----------------------------------------------------------------------
> dbus-call-method: D-Bus error:
> "org.freedesktop.DBus.Error.UnknownMethod", "Method SyncView is not
> implemented on interface org.mate.atril.Window"
> ----------------------------------------------------------------------
> This is a bit annoying because I type C-c C-a many times when I write
> my documents and emacs glitches for a couple of seconds every time
> with the above error.

Argh, too bad.  I just validated that Evince still works (for me).  We
assume that the DBUS interfaces of Evince, Atril, and Xreader have the
same DBUS interface.

> I'm using the atril provided by FreeBSD official binary packages. It
> is built with --disable-synctex configure option, so I suppose it
> doesn't support forward search.

Yeah, seems plausible.

> I suspect that the `(TeX-evince-dbus-p de app :forward)' check in
> `TeX-view-program-select-evince' isn't working as expected.  If I
> understand correctly, it should return nil since my atril doesn't
> support forward search.

Yes, kind of.  See below.

> However, it returns t for me.

Too bad. :-)

> (dbus-introspect-get-method
>                           :session (format "org.%s.%s.Daemon" de app)
>                           (format "/org/%s/%s/Daemon" de app)
>                           (format "org.%s.%s.Daemon" de app)
>                           "FindDocument")
> . I don't understand the detail of this form, but shouldn't this
> "FindDocument" be something different, most probably "SyncView",
> looking at `TeX-evince-sync-view-1'?

Yes and no.  When forward-syncing, we first call the Daemon's
FindDocument method.  That ensures that there's actually a
evince/atril/xreader window showing the document and the call returns a
handle to the session bus to be used to control this specific window.
Thereafter, we call SyncView on the window and its bus possibly spawned
by the FindDocument call.

So the problem is that we cannot test for the availability of the
SyncView method when we haven't a window with its session bus already.
It's kind of a hen and egg problem.

I'm not actually sure how to handle that.  Basically we could catch the
error in TeX-evince-sync-view-1 when calling SyncView and somehow fall
back to the command line version.  Of course, that's kind of ugly.  I
don't know how common it is to have an Atril/Evince/Xreader with all
DBUS whistles but synctex disabled.  Apparently nobody complained in for


reply via email to

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