* Jose Aliste (2010-06-13) writes: > On Sat, Jun 12, 2010 at 2:09 PM, Ralf Angeli <[email protected]> wrote: > >> In AUCTeX one can carry out a function instead of simply executing a >> command line when calling a viewer. If the function can incorporate the >> logic hinted at above, then supporting DBUS should be no major problem. >> However, at least the forward search works fine via the command line at >> the moment. What would be gained to implement it with DBUS? > > The main reason is interoperability/ portability IMO. The main thing > about DBUS is that you get a fine control of the viewer. For instance, > you would call Evince only the first time, and then use DBUS to do the > forward search whenever you need to.
Well, yes, but this is already working with the command line interface. At least for opening a certain page. When Evince is asked to open a document that is already being displayed, it is not opened in a new Evince instance but the displaying instance will switch to the requested page. Also, I just checked the Evince sources and in <URL:http://git.gnome.org/browse/evince/tree/configure.ac> it looks as if D-Bus support can be disabled. So it is not guaranteed that D-Bus is available which would make the method with command line calls the more robust one. I am not sure, though, if the behavior above described works if D-Bus is not available. > DBUS is IMO the right way to go. > You could of course add new command line options to evince so that not > only you open the link in a page but also you highlight the > corresponding part in the pdf/dvi (and the first patches to evince did > that), but you would expose parameters that a normal user should not > known/use (from the point of view of Evince). It probably depends on how convoluted the arguments to be given on the command line can get. > For backward search, in emacs you would listen to the DBUS signal > evince emits, and highlight the source that corresponds. Yep. Since I don't know the D-Bus implementation in Emacs very well, I am not sure if it offers some methods which could be used for that per default. Skimming through the Emacs D-Bus manual I could not find any. > Evince just > does not know which editor you are using, so the support is not tied > to any editor. You could do this again, using the command line, > passing the editor cmd to evince when you call it, but it seems a > little akward to do it this way (again, in my opinion). Actually this is the way inverse search has worked between Emacs/AUCTeX and xdvi for years. So for me this does not seem very awkward. (c; Anyway, if somebody is interested in implementing support for D-Bus-based communication with Evince (and perhaps other viewers) I would not argue against it. (Even though I don't see the immediate benefits compared to the command line interface. But that's probably just because Evince did this so well for forward search. (c;) But we should keep the command-line-based communication as a fallback. -- Ralf _______________________________________________ auctex-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex-devel
